From 8e08b1dcb078fcf40fffb901bf66fd40132aa1ec Mon Sep 17 00:00:00 2001 From: "l.gabrysiak" Date: Sat, 1 Mar 2025 13:37:44 +0100 Subject: [PATCH] auth redirect --- src/routes/+layout.svelte | 6 ++++-- src/routes/auth/+page.svelte | 4 ---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index d6383ca..a4ea899 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -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`); } } } diff --git a/src/routes/auth/+page.svelte b/src/routes/auth/+page.svelte index 08786ab..02746d2 100644 --- a/src/routes/auth/+page.svelte +++ b/src/routes/auth/+page.svelte @@ -49,10 +49,6 @@ const redirectPath = querystringValue('redirect') || '/'; goto(redirectPath); } - else - { - goto(`${WEBUI_BASE_URL}/oauth/oidc/login`); - } }; const signInHandler = async () => {