Skip to content

Commit

Permalink
fix: Fix list of scopes in app integrations (#631)
Browse files Browse the repository at this point in the history
* fix: Fix list of scopes in app integration
  • Loading branch information
jorgeajimenezl committed Jul 17, 2024
1 parent 4da41da commit 11f13e4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion authlib/integrations/base_client/sync_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,12 @@ def _create_oauth2_authorization_url(client, authorization_endpoint, **kwargs):
log.debug(f'Using code_verifier: {code_verifier!r}')

scope = kwargs.get('scope', client.scope)
if scope and 'openid' in scope.split():
scope = (
(scope if isinstance(scope, (list, tuple)) else scope.split())
if scope
else None
)
if scope and "openid" in scope:
# this is an OpenID Connect service
nonce = kwargs.get('nonce')
if not nonce:
Expand Down

0 comments on commit 11f13e4

Please sign in to comment.