fix: add admin social login
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user