mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-25 02:05:51 +02:00
add support for multiple oauth providers
This commit is contained in:
@@ -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": []}
|
||||
|
||||
Reference in New Issue
Block a user