mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #15366] [MERGED] feat: Custom oauth timeout #39433
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/15366
Author: @akiraro
Created: 6/27/2025
Status: ✅ Merged
Merged: 6/27/2025
Merged by: @tjbck
Base:
dev← Head:feat/oidc-httpx-timeout📝 Commits (1)
88ea0f5feat: custom oauth timeout📊 Changes
1 file changed (+16 additions, -2 deletions)
View changed files
📝
backend/open_webui/config.py(+16 -2)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.featChangelog Entry
Description
This pull request addresses a timeout issue with all OAuth/OIDC-based SSO integrations by making the backend's HTTP client timeout configurable. When connecting to any external SSO provider (e.g., OIDC, Google, GitHub) that exhibits high latency, the previous short, hardcoded timeout would cause an
httpx.ReadTimeoutexception. This resulted in a failed login and a misleading "incorrect email or password" error in the UI.This change introduces a new environment variable,
OAUTH_TIMEOUT, allowing administrators to set a longer timeout for these connections. This improves the reliability and robustness of all SSO integrations, ensuring compatibility with a wider range of real-world providers and network conditions.Added
OAUTH_TIMEOUTto configure the timeout (in seconds) for all outbound SSO client HTTP requests. It defaults to a reasonable value (e.g.,20.0) if not set.Changed
AsyncOAuth2Clientused for all SSO authentication flows now uses the value fromOAUTH_TIMEOUTinstead of a hardcoded default.Deprecated
Removed
Fixed
httpx.ReadTimeoutwhen any OAuth/OIDC provider is slow to respond from its token endpoint.Security
Breaking Changes
Additional Information
Screenshots or Videos
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.