mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
Merge pull request #9456 from mitomac/fix-oidc-email-claim-new
fix: check for email claim before skipping userinfo endpoint
This commit is contained in:
commit
397595de9d
1 changed files with 1 additions and 1 deletions
|
|
@ -193,7 +193,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:
|
||||
if not user_data or "email" 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}")
|
||||
|
|
|
|||
Loading…
Reference in a new issue