mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[GH-ISSUE #13230] issue: Oauth does not use environment proxy setting when fetching claims #16855
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 @JoeLudwig on GitHub (Apr 25, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13230
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.6.5
Ollama Version (if applicable)
No response
Operating System
Debian 12
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Oauth SSO completes in a timely manner. It pulls profile images from the Oauth provider, using the proxy server specified in the environment.
Actual Behavior
Open WebUI attempts to connect directly to the profile picture provider, and that connection times out after a while. This causes unfortunate behavior in the UI that makes it look like the sign in failed, even though it kind of succeeded. Do this enough times, and eventually you will be signed in.
Steps to Reproduce
There are two calls to
aiohttp.ClientSession()inside oauth.py what do not passtrust_env=Trueinto the constructor. That causes the session to not respect the proxy settings in the environment, so if your server happens to be in an environment that requires a proxy to talk to the internet, the requests for profile pictures will time out. There are other constructor calls to for that class which also don't passtrust_env-True. I did not audit all of them to determine if those other calls also represent bugs.We happen to use Microsoft SSO, but the bug doesn't appear to be Microsoft-specific and will likely occur any time you run behind a proxy server and use SSO.
Logs & Screenshots
2025-04-25 20:35:12.806 | ERROR | open_webui.utils.oauth:handle_callback:361 - Error downloading profile image 'https://graph.microsoft.com/v1.0/me/photo/$value': Connection timeout to host https://graph.microsoft.com/v1.0/me/photo/$value - {}
Additional Information
No response
@tjbck commented on GitHub (Apr 28, 2025):
Should be addressed with
7d0a78a43abased on your issue description, if not resolved PR welcome.@JoeLudwig commented on GitHub (Apr 29, 2025):
Looks great to me. Thanks!