Merge pull request #7551 from jonassvatos/patch-1

feat: Add OAUTH_ALLOWED_DOMAINS
This commit is contained in:
Timothy Jaeryang Baek
2024-12-09 16:27:06 -08:00
committed by GitHub
2 changed files with 11 additions and 0 deletions

View File

@@ -429,6 +429,12 @@ OAUTH_ADMIN_ROLES = PersistentConfig(
[role.strip() for role in os.environ.get("OAUTH_ADMIN_ROLES", "admin").split(",")],
)
OAUTH_ALLOWED_DOMAINS = PersistentConfig(
"OAUTH_ALLOWED_DOMAINS",
"oauth.allowed_domains",
[domain.strip() for domain in os.environ.get("OAUTH_ALLOWED_DOMAINS", "*").split(",")],
)
def load_oauth_providers():
OAUTH_PROVIDERS.clear()