From 538fbf261c46eabd852520ad8bf6863bfa80413d Mon Sep 17 00:00:00 2001 From: Kevin Burnett <18027+burnettk@users.noreply.github.com> Date: Tue, 18 Jun 2024 18:21:26 +0000 Subject: [PATCH] config scope (#1755) Co-authored-by: burnettk --- .../src/spiffworkflow_backend/config/default.py | 2 ++ .../spiffworkflow_backend/services/authentication_service.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/config/default.py b/spiffworkflow-backend/src/spiffworkflow_backend/config/default.py index 5accef12..1f2306e1 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/config/default.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/config/default.py @@ -242,3 +242,5 @@ config_from_env("SPIFFWORKFLOW_BACKEND_USE_WERKZEUG_MIDDLEWARE_PROXY_FIX", defau # only for DEBUGGING - turn off threaded task execution. config_from_env("SPIFFWORKFLOW_BACKEND_USE_THREADS_FOR_TASK_EXECUTION", default=True) + +config_from_env("SPIFFWORKFLOW_BACKEND_OPENID_SCOPE", default="openid profile email") diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/authentication_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/authentication_service.py index 39ea167d..ee89d63d 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/authentication_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/authentication_service.py @@ -259,7 +259,7 @@ class AuthenticationService: + f"?state={state}&" + "response_type=code&" + f"client_id={self.client_id(authentication_identifier)}&" - + "scope=openid profile email&" + + f"scope={current_app.config['SPIFFWORKFLOW_BACKEND_OPENID_SCOPE']}&" + f"redirect_uri={redirect_url_to_use}" ) return login_redirect_url