[PR #23436] [CLOSED] fix: enable follow_redirects for OAuth client to support redirect-bas… #130859

Closed
opened 2026-05-21 15:35:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23436
Author: @micheal000010000-hub
Created: 4/6/2026
Status: ❌ Closed

Base: dev ← Head: fix/oauth-redirect


📝 Commits (1)

  • 142db69 fix: enable follow_redirects for OAuth client to support redirect-based providers

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 backend/open_webui/utils/oauth.py (+1 -0)

📄 Description

Description

This PR enables follow_redirects=True in the OAuth client configuration.

Some OAuth providers return HTTP 302 redirect responses during token exchange or user info retrieval. By default, these redirects are not followed, which can cause OAuth authentication to fail.

This change ensures that redirect responses are handled correctly, improving compatibility with providers that rely on redirects.


Fixed

  • Enable redirect handling for OAuth client by adding follow_redirects=True to client_kwargs

Additional Information

  • This change is based on analysis of OAuthClientManager in the backend
  • The issue could not be consistently reproduced using standard providers like GitHub, but aligns with the reported behavior in redirect-based OAuth providers
  • No breaking changes expected

Open to feedback if this approach aligns with project expectations.

Contributor License Agreement

  • By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/23436 **Author:** [@micheal000010000-hub](https://github.com/micheal000010000-hub) **Created:** 4/6/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/oauth-redirect` --- ### 📝 Commits (1) - [`142db69`](https://github.com/open-webui/open-webui/commit/142db698e50da0b7ec87354df1b41e3c339340e0) fix: enable follow_redirects for OAuth client to support redirect-based providers ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/utils/oauth.py` (+1 -0) </details> ### 📄 Description ## Description This PR enables `follow_redirects=True` in the OAuth client configuration. Some OAuth providers return HTTP 302 redirect responses during token exchange or user info retrieval. By default, these redirects are not followed, which can cause OAuth authentication to fail. This change ensures that redirect responses are handled correctly, improving compatibility with providers that rely on redirects. --- ## Fixed * Enable redirect handling for OAuth client by adding `follow_redirects=True` to `client_kwargs` --- ## Additional Information * This change is based on analysis of `OAuthClientManager` in the backend * The issue could not be consistently reproduced using standard providers like GitHub, but aligns with the reported behavior in redirect-based OAuth providers * No breaking changes expected --- Open to feedback if this approach aligns with project expectations. ## Contributor License Agreement * [x] By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-21 15:35:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#130859