瀏覽代碼

fixed: incorrectly indexing the key userinfo in the token.

Tryanks 3 月之前
父節點
當前提交
4b6700a4b2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      backend/open_webui/utils/oauth.py

+ 1 - 1
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: