From b8f3abda5a368194002cf278dcd84eb69bce0d14 Mon Sep 17 00:00:00 2001 From: Dong Shin Date: Tue, 4 Mar 2025 15:50:04 +0900 Subject: [PATCH] fix: email claim constant --- backend/open_webui/utils/oauth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/utils/oauth.py b/backend/open_webui/utils/oauth.py index 2af54c19d..be3466362 100644 --- a/backend/open_webui/utils/oauth.py +++ b/backend/open_webui/utils/oauth.py @@ -234,7 +234,7 @@ class OAuthManager: log.warning(f"OAuth callback error: {e}") raise HTTPException(400, detail=ERROR_MESSAGES.INVALID_CRED) user_data: UserInfo = token.get("userinfo") - if not user_data or "email" not in user_data: + if not user_data or auth_manager_config.OAUTH_EMAIL_CLAIM not in user_data: user_data: UserInfo = await client.userinfo(token=token) if not user_data: log.warning(f"OAuth callback failed, user data is missing: {token}")