Fix: email claim doesn't effect

This commit is contained in:
星海 2025-02-20 11:32:48 +08:00 committed by GitHub
parent 3f3a5bb0ab
commit dec44e4bcd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -285,9 +285,7 @@ class OAuthManager:
# If the user does not exist, check if signups are enabled # If the user does not exist, check if signups are enabled
if auth_manager_config.ENABLE_OAUTH_SIGNUP: if auth_manager_config.ENABLE_OAUTH_SIGNUP:
# Check if an existing user with the same email already exists # Check if an existing user with the same email already exists
existing_user = Users.get_user_by_email( existing_user = Users.get_user_by_email(email)
user_data.get("email", "").lower()
)
if existing_user: if existing_user:
raise HTTPException(400, detail=ERROR_MESSAGES.EMAIL_TAKEN) raise HTTPException(400, detail=ERROR_MESSAGES.EMAIL_TAKEN)