auth redirect
This commit is contained in:
parent
0a330c4d93
commit
8e08b1dcb0
|
|
@ -502,13 +502,15 @@
|
||||||
} else {
|
} else {
|
||||||
// Redirect Invalid Session User to /auth Page
|
// Redirect Invalid Session User to /auth Page
|
||||||
localStorage.removeItem('token');
|
localStorage.removeItem('token');
|
||||||
await goto('/auth');
|
//await goto('/auth');
|
||||||
|
await goto(`${WEBUI_BASE_URL}/oauth/oidc/login`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Don't redirect if we're already on the auth page
|
// Don't redirect if we're already on the auth page
|
||||||
// Needed because we pass in tokens from OAuth logins via URL fragments
|
// Needed because we pass in tokens from OAuth logins via URL fragments
|
||||||
if ($page.url.pathname !== '/auth') {
|
if ($page.url.pathname !== '/auth') {
|
||||||
await goto('/auth');
|
//await goto('/auth');
|
||||||
|
await goto(`${WEBUI_BASE_URL}/oauth/oidc/login`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,10 +49,6 @@
|
||||||
const redirectPath = querystringValue('redirect') || '/';
|
const redirectPath = querystringValue('redirect') || '/';
|
||||||
goto(redirectPath);
|
goto(redirectPath);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
goto(`${WEBUI_BASE_URL}/oauth/oidc/login`);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const signInHandler = async () => {
|
const signInHandler = async () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue