Added OAUTH_USE_PICTURE_CLAIM env var

Added OAUTH_USE_PICTURE_CLAIM to config.py

Added check to oauth.py on OAUTH_USE_PICTURE_CLAIM, to decide whether to user the profile picture in the claim or the default user.png
This commit is contained in:
CityOfBunbury
2025-04-03 08:24:14 +08:00
parent 04799f1f95
commit 548c7f17d7
2 changed files with 47 additions and 34 deletions

View File

@@ -331,6 +331,12 @@ JWT_EXPIRES_IN = PersistentConfig(
# OAuth config
####################################
OAUTH_USE_PICTURE_CLAIM = PersistentConfig(
"OAUTH_USE_PICTURE_CLAIM",
"oauth.oidc.use_picture_claim",
os.environ.get("OAUTH_USE_PICTURE_CLAIM", "True").lower() == "true",
)
ENABLE_OAUTH_SIGNUP = PersistentConfig(
"ENABLE_OAUTH_SIGNUP",
"oauth.enable_signup",