From 4b6700a4b21347733fe83d22256406605137539e Mon Sep 17 00:00:00 2001 From: Tryanks Date: Fri, 17 Jan 2025 00:33:20 +0800 Subject: [PATCH] fixed: incorrectly indexing the key userinfo in the token. --- 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 48fc1d740..c0efe29b8 100644 --- a/backend/open_webui/utils/oauth.py +++ b/backend/open_webui/utils/oauth.py @@ -200,7 +200,7 @@ class OAuthManager: except Exception as e: log.warning(f"OAuth callback error: {e}") raise HTTPException(400, detail=ERROR_MESSAGES.INVALID_CRED) - user_data: UserInfo = token["userinfo"] + user_data: UserInfo = token.get("userinfo") if not user_data: user_data: UserInfo = await client.userinfo(token=token) if not user_data: