This commit is contained in:
Timothy Jaeryang Baek 2026-05-09 02:54:09 +09:00
parent ff791b4814
commit cde72dab71
2 changed files with 8 additions and 0 deletions

View file

@ -1209,6 +1209,12 @@ TOOL_SERVER_CONNECTIONS = PersistentConfig(
tool_server_connections,
)
OAUTH_CLIENT_TIMEOUT = PersistentConfig(
'OAUTH_CLIENT_TIMEOUT',
'oauth.client.timeout',
os.environ.get('OAUTH_CLIENT_TIMEOUT', ''),
)
####################################
# TERMINAL_SERVER
####################################

View file

@ -37,6 +37,7 @@ from open_webui.models.groups import Groups, GroupModel, GroupUpdateForm, GroupF
from open_webui.config import (
DEFAULT_USER_ROLE,
ENABLE_OAUTH_SIGNUP,
OAUTH_CLIENT_TIMEOUT,
OAUTH_REFRESH_TOKEN_INCLUDE_SCOPE,
OAUTH_MERGE_ACCOUNTS_BY_EMAIL,
OAUTH_PROVIDERS,
@ -597,6 +598,7 @@ class OAuthClientManager:
'client_secret': oauth_client_info.client_secret,
'client_kwargs': {
'follow_redirects': True,
**({'timeout': int(OAUTH_CLIENT_TIMEOUT.value)} if OAUTH_CLIENT_TIMEOUT.value else {}),
**({'scope': oauth_client_info.scope} if oauth_client_info.scope else {}),
**(
{'token_endpoint_auth_method': oauth_client_info.token_endpoint_auth_method}