From 4e82c44f3e4cac2ca4a7574967a5caf4058c1ece Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sat, 31 May 2025 15:04:38 +0400 Subject: [PATCH] refac --- backend/open_webui/utils/oauth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/utils/oauth.py b/backend/open_webui/utils/oauth.py index de3355859..6c98ed7df 100644 --- a/backend/open_webui/utils/oauth.py +++ b/backend/open_webui/utils/oauth.py @@ -538,7 +538,7 @@ class OAuthManager: # Redirect back to the frontend with the JWT token redirect_base_url = request.app.state.config.WEBUI_URL or request.base_url - if redirect_base_url.endswith("/"): + if isinstance(redirect_base_url, str) and redirect_base_url.endswith("/"): redirect_base_url = redirect_base_url[:-1] redirect_url = f"{redirect_base_url}/auth#token={jwt_token}"