Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ It has been tested with:

* `Google+ Login <https://developers.google.com/accounts/docs/OAuth2Login>`_
* `Ipsilon <https://ipsilon-project.org/>`_
* `MojeID <https://mojeid.cz>`_


Project status
Expand Down
3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ A very basic example client::
def index():
if oidc.user_loggedin:
return 'Welcome %s' % oidc.user_getfield('email')
else
else:
return 'Not logged in'

@app.route('/login')
Expand Down Expand Up @@ -136,6 +136,7 @@ for information on how to obtain client secrets.
For example, for Google, you will need to visit `Google API credentials management
<https://console.developers.google.com/apis/credentials?project=_>`_.

For `MojeID <https://www.mojeid.cz/en/provider/getting-started/>`_, you type ``oidc-register https://mojeid.cz/oidc/ https://your-application``.

Manual client registration
--------------------------
Expand Down
4 changes: 3 additions & 1 deletion flask_oidc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,9 @@ def _is_id_token_valid(self, id_token):
logger.error('id_token issued by non-trusted issuer: %s'
% id_token['iss'])
return False


if isinstance(id_token['aud'], list) and len(id_token['aud']) == 1:
id_token['aud'] = id_token['aud'][0]
if isinstance(id_token['aud'], list):
# step 3 for audience list
if self.flow.client_id not in id_token['aud']:
Expand Down