auth redirect

This commit is contained in:
l.gabrysiak 2025-03-01 13:37:44 +01:00
parent 0a330c4d93
commit 8e08b1dcb0
2 changed files with 4 additions and 6 deletions

View File

@ -502,13 +502,15 @@
} else {
// Redirect Invalid Session User to /auth Page
localStorage.removeItem('token');
await goto('/auth');
//await goto('/auth');
await goto(`${WEBUI_BASE_URL}/oauth/oidc/login`);
}
} else {
// Don't redirect if we're already on the auth page
// Needed because we pass in tokens from OAuth logins via URL fragments
if ($page.url.pathname !== '/auth') {
await goto('/auth');
//await goto('/auth');
await goto(`${WEBUI_BASE_URL}/oauth/oidc/login`);
}
}
}

View File

@ -49,10 +49,6 @@
const redirectPath = querystringValue('redirect') || '/';
goto(redirectPath);
}
else
{
goto(`${WEBUI_BASE_URL}/oauth/oidc/login`);
}
};
const signInHandler = async () => {