mirror of
https://github.com/open-webui/open-webui
synced 2025-02-23 13:51:07 +00:00
fix: check for email claim before skipping userinfo endpoint
This commit is contained in:
parent
b8fe9497fb
commit
34b62e71cc
@ -193,7 +193,7 @@ class OAuthManager:
|
|||||||
log.warning(f"OAuth callback error: {e}")
|
log.warning(f"OAuth callback error: {e}")
|
||||||
raise HTTPException(400, detail=ERROR_MESSAGES.INVALID_CRED)
|
raise HTTPException(400, detail=ERROR_MESSAGES.INVALID_CRED)
|
||||||
user_data: UserInfo = token.get("userinfo")
|
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)
|
user_data: UserInfo = await client.userinfo(token=token)
|
||||||
if not user_data:
|
if not user_data:
|
||||||
log.warning(f"OAuth callback failed, user data is missing: {token}")
|
log.warning(f"OAuth callback failed, user data is missing: {token}")
|
||||||
|
Loading…
Reference in New Issue
Block a user