mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
[GH-ISSUE #23409] issue: OAuth authentication fails when provider uses redirects #58641
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 @olivier-lacroix on GitHub (Apr 5, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23409
Bug Report
Check Existing Issues
Installation Method
Open WebUI Version
Operating System
Confirmation
README.md.Expected Behavior
OAuth authentication should complete successfully even if the OAuth provider's endpoints (e.g., token endpoint or user info endpoint) perform HTTP redirects.
Actual Behavior
The OAuth authentication flow fails with an error during the exchange or profile retrieval phase because the underlying HTTP client does not follow redirects by default. This results in a failure to obtain tokens or user information when the provider redirects the request.
Steps to Reproduce
Logs & Screenshots
Additional Information
The issue is caused by the
OAuthClientManagernot settingfollow_redirects=Truein theclient_kwargsfor the OAuth client. Enabling this option ensures that the HTTP client correctly handles redirects from OAuth providers.@olivier-lacroix commented on GitHub (Apr 7, 2026):
Fox proposed in https://github.com/open-webui/open-webui/pull/23410
@tjbck commented on GitHub (Apr 13, 2026):
Addressed in dev.