mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-28 05:27:35 +00:00
fix(auth): suppress OAUTH_AUTO_REDIRECT on signout navigation to prevent logout redirect loop (#29076)
This commit is contained in:
parent
d3e8bf3405
commit
d3353bdb1d
2 changed files with 4 additions and 3 deletions
|
|
@ -574,7 +574,7 @@
|
|||
user.set(null);
|
||||
localStorage.removeItem('token');
|
||||
|
||||
location.href = res?.redirect_url ?? '/auth';
|
||||
location.href = res?.redirect_url ?? '/auth?signout=true';
|
||||
show = false;
|
||||
}}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -173,9 +173,10 @@
|
|||
|
||||
// Auto-redirect to SSO when OAUTH_AUTO_REDIRECT is enabled and the
|
||||
// deployment is unambiguously SSO-only (single provider, no login form,
|
||||
// no LDAP). Suppressed by ?form=, ?error=, onboarding, trusted-header
|
||||
// no LDAP). Suppressed by ?form=, ?error=, ?signout, onboarding, trusted-header
|
||||
// auth, or an existing session/token.
|
||||
if ($config?.oauth?.auto_redirect && !form && !error) {
|
||||
const signout = $page.url.searchParams.get('signout');
|
||||
if ($config?.oauth?.auto_redirect && !form && !error && !signout) {
|
||||
const providers = Object.keys($config?.oauth?.providers ?? {});
|
||||
if (
|
||||
providers.length === 1 &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue