feat: add admin social login bindings

This commit is contained in:
237899745
2026-05-27 21:24:48 +08:00
parent 5dbe666420
commit 89cb98233f
39 changed files with 904 additions and 123 deletions

View File

@@ -283,7 +283,8 @@ 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)
if provider in enabled_providers and social_uid and not existing_identity:
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:
binding = database.upsert_social_login_binding(
user_id=user_id,
provider=provider,