add support for multiple oauth providers

This commit is contained in:
maxDorninger
2025-09-04 17:03:57 +02:00
parent c367e3d898
commit 1f544e55e8
8 changed files with 3890 additions and 3926 deletions

View File

@@ -26,9 +26,10 @@ def get_all_users(db: DbSessionDependency) -> list[UserRead]:
@auth_metadata_router.get("/auth/metadata", status_code=status.HTTP_200_OK)
def get_auth_metadata() -> dict:
if oauth_config.enabled:
return {
"oauth_name": oauth_config.name,
}
if oauth_config:
provider_names = [
name for name, config in oauth_config.items() if config.enabled
]
return {"oauth_providers": provider_names}
else:
return {"oauth_name": None}
return {"oauth_providers": []}