mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #8619] bug: [SSO] When the OAuth provider does not provide the 'userinfo' in the token field, the backend will raise an exception instead of evaluating it as None in subsequent code. #53865
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Tryanks on GitHub (Jan 16, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8619
Installation Method
git clone
Environment
0425621494Confirmation:
Description
At oauth.py#L203, the program directly indexes the key
userinfofrom the token and later checksif not user_data:.The issue here is that if the OAuth provider does not provide the 'userinfo' field (for example, GitHub only provides
access_token), the program will not proceed to the next step but will instead crash, displaying an internal error on the webpage.The fix is to modify it to: