From da8df2ed4c2d786df015dda3a5794d9e306ccc83 Mon Sep 17 00:00:00 2001 From: chrisblech Date: Wed, 16 Sep 2026 22:13:00 +0000 Subject: [PATCH] changes OIDC_SCOPES type from string to list, fixes https://github.com/simple-login/app/issues/2812 --- app/auth/views/oidc.py | 4 ++-- app/config.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/auth/views/oidc.py b/app/auth/views/oidc.py index bbda54358..f5f1f98d9 100644 --- a/app/auth/views/oidc.py +++ b/app/auth/views/oidc.py @@ -36,7 +36,7 @@ def oidc_login(): auth_url = requests.get(config.OIDC_WELL_KNOWN_URL).json()["authorization_endpoint"] oidc = OAuth2Session( - config.OIDC_CLIENT_ID, scope=[OIDC_SCOPES], redirect_uri=redirect_uri + config.OIDC_CLIENT_ID, scope=OIDC_SCOPES, redirect_uri=redirect_uri ) authorization_url, state = oidc.authorization_url(auth_url) @@ -66,7 +66,7 @@ def oidc_callback(): oidc = OAuth2Session( config.OIDC_CLIENT_ID, state=session[SESSION_STATE_KEY], - scope=[OIDC_SCOPES], + scope=OIDC_SCOPES, redirect_uri=redirect_uri, ) oidc.fetch_token( diff --git a/app/config.py b/app/config.py index e0e395766..a413e5a16 100644 --- a/app/config.py +++ b/app/config.py @@ -314,7 +314,7 @@ def facebook_enabled(): OIDC_WELL_KNOWN_URL = os.environ.get("OIDC_WELL_KNOWN_URL") OIDC_CLIENT_ID = os.environ.get("OIDC_CLIENT_ID") OIDC_CLIENT_SECRET = os.environ.get("OIDC_CLIENT_SECRET") -OIDC_SCOPES = os.environ.get("OIDC_SCOPES") +OIDC_SCOPES = os.environ.get("OIDC_SCOPES", "openid email profile").split() OIDC_NAME_FIELD = os.environ.get("OIDC_NAME_FIELD", "name") PROTON_CLIENT_ID = os.environ.get("PROTON_CLIENT_ID")