fix: add admin social login

This commit is contained in:
237899745
2026-05-27 23:35:08 +08:00
parent 0443c976fc
commit 15823ee8a4
6 changed files with 593 additions and 14 deletions

View File

@@ -259,8 +259,7 @@ def register():
social_uid = str(pending.get("social_uid") or "").strip()
enabled_providers = parse_providers((database.get_system_config() or {}).get("social_login_providers"))
existing_identity = database.find_social_login_binding(provider, social_uid)
existing_admin_identity = database.find_admin_social_login_binding_by_identity(provider, social_uid)
if provider in enabled_providers and social_uid and not existing_identity and not existing_admin_identity:
if provider in enabled_providers and social_uid and not existing_identity:
binding = database.upsert_social_login_binding(
user_id=user_id,
provider=provider,