mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-28 13:05:26 -05:00
feat: OIDC: add the ability to override the requested scopes (#4530)
This commit is contained in:
@@ -28,8 +28,12 @@ remember_me_duration = timedelta(days=14)
|
||||
settings = get_app_settings()
|
||||
if settings.OIDC_READY:
|
||||
oauth = OAuth()
|
||||
groups_claim = settings.OIDC_GROUPS_CLAIM if settings.OIDC_REQUIRES_GROUP_CLAIM else ""
|
||||
scope = f"openid email profile {groups_claim}"
|
||||
scope = None
|
||||
if settings.OIDC_SCOPES_OVERRIDE:
|
||||
scope = settings.OIDC_SCOPES_OVERRIDE
|
||||
else:
|
||||
groups_claim = settings.OIDC_GROUPS_CLAIM if settings.OIDC_REQUIRES_GROUP_CLAIM else ""
|
||||
scope = f"openid email profile {groups_claim}"
|
||||
client_args = {"scope": scope.rstrip()}
|
||||
if settings.OIDC_TLS_CACERTFILE:
|
||||
client_args["verify"] = settings.OIDC_TLS_CACERTFILE
|
||||
|
||||
Reference in New Issue
Block a user