mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-05 08:10:30 +00:00
refac
This commit is contained in:
parent
e4dbfb1276
commit
97c5f52bbc
1 changed files with 3 additions and 5 deletions
|
|
@ -157,9 +157,7 @@
|
|||
const redirectPath = $page.url.searchParams.get('redirect');
|
||||
const logout = $page.url.searchParams.get('logout') === 'true';
|
||||
|
||||
if (logout) {
|
||||
await user.set(null);
|
||||
} else if ($user) {
|
||||
if ($user && !logout) {
|
||||
goto(redirectPath || '/');
|
||||
} else {
|
||||
if (redirectPath) {
|
||||
|
|
@ -177,8 +175,8 @@
|
|||
|
||||
// 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
|
||||
// auth, or an existing session/token.
|
||||
// no LDAP). Suppressed by ?logout=true, ?form=, ?error=, onboarding,
|
||||
// trusted-header auth, or an existing session/token.
|
||||
if ($config?.oauth?.auto_redirect && !logout && !form && !error) {
|
||||
const providers = Object.keys($config?.oauth?.providers ?? {});
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue