0e42b03 fix: enable follow_redirects in OAuth client manager
📊 Changes
1 file changed (+1 additions, -0 deletions)
View changed files
📝backend/open_webui/utils/oauth.py (+1 -0)
📄 Description
Pull Request Checklist
Target branch: Verify that the pull request targets the dev branch.
Description: Enable follow_redirects in the OAuth client manager to handle providers that redirect on token/userinfo endpoints.
Changelog: Added entry below.
Documentation: N/A for this internal fix.
Dependencies: No new dependencies.
Testing: Verified that the change correctly adds the follow_redirects flag to the client configuration.
Agentic AI Code: This PR implements a specific fix requested and reviewed.
Code review: Self-reviewed the change.
Design & Architecture: Follows existing patterns in OAuthClientManager.
Git Hygiene: Atomic change on a clean branch.
Description
This PR fixes an issue where OAuth authentication would fail if the provider's token or user information endpoints performed an HTTP redirect. By default, the HTTP client used by Authlib in our OAuthClientManager does not follow redirects. Enabling follow_redirects: True ensures better compatibility with various OAuth providers.
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/23410
**Author:** [@olivier-lacroix](https://github.com/olivier-lacroix)
**Created:** 4/5/2026
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `fix/oauth-redirect-handling`
---
### 📝 Commits (1)
- [`0e42b03`](https://github.com/open-webui/open-webui/commit/0e42b030c680ee46c9a520f2e85253cb35ae2de1) fix: enable follow_redirects in OAuth client manager
### 📊 Changes
**1 file changed** (+1 additions, -0 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/utils/oauth.py` (+1 -0)
</details>
### 📄 Description
<!--
⚠️ CRITICAL CHECKS FOR CONTRIBUTORS (READ, DON'T DELETE) ⚠️
1. Target the `dev` branch. PRs targeting `main` will be automatically closed.
2. Do NOT delete the CLA section at the bottom. It is required for the bot to accept your PR.
-->
# Pull Request Checklist
- [x] **Target branch:** Verify that the pull request targets the `dev` branch.
- [x] **Description:** Enable `follow_redirects` in the OAuth client manager to handle providers that redirect on token/userinfo endpoints.
- [x] **Changelog:** Added entry below.
- [ ] **Documentation:** N/A for this internal fix.
- [ ] **Dependencies:** No new dependencies.
- [x] **Testing:** Verified that the change correctly adds the `follow_redirects` flag to the client configuration.
- [x] **Agentic AI Code:** This PR implements a specific fix requested and reviewed.
- [x] **Code review:** Self-reviewed the change.
- [x] **Design & Architecture:** Follows existing patterns in `OAuthClientManager`.
- [x] **Git Hygiene:** Atomic change on a clean branch.
### Description
This PR fixes an issue where OAuth authentication would fail if the provider's token or user information endpoints performed an HTTP redirect. By default, the HTTP client used by Authlib in our `OAuthClientManager` does not follow redirects. Enabling `follow_redirects: True` ensures better compatibility with various OAuth providers.
Fixes #23409
# Changelog Entry
### Fixed
- Fixed OAuth authentication failures when providers use redirects on API endpoints.
---
### Additional Information
- Linked to issue #23409
### Contributor License Agreement
- [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), 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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23410
Author: @olivier-lacroix
Created: 4/5/2026
Status: ❌ Closed
Base:
dev← Head:fix/oauth-redirect-handling📝 Commits (1)
0e42b03fix: enable follow_redirects in OAuth client manager📊 Changes
1 file changed (+1 additions, -0 deletions)
View changed files
📝
backend/open_webui/utils/oauth.py(+1 -0)📄 Description
Pull Request Checklist
devbranch.follow_redirectsin the OAuth client manager to handle providers that redirect on token/userinfo endpoints.follow_redirectsflag to the client configuration.OAuthClientManager.Description
This PR fixes an issue where OAuth authentication would fail if the provider's token or user information endpoints performed an HTTP redirect. By default, the HTTP client used by Authlib in our
OAuthClientManagerdoes not follow redirects. Enablingfollow_redirects: Trueensures better compatibility with various OAuth providers.Fixes #23409
Changelog Entry
Fixed
Additional Information
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.