forked from wrenn/wrenn
Redirect authenticated users away from login page
This commit is contained in:
@ -33,6 +33,11 @@
|
|||||||
|
|
||||||
// Read OAuth error forwarded from /auth/github/callback
|
// Read OAuth error forwarded from /auth/github/callback
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
if (auth.isAuthenticated) {
|
||||||
|
goto('/dashboard');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const urlErr = $page.url.searchParams.get('error');
|
const urlErr = $page.url.searchParams.get('error');
|
||||||
if (urlErr) {
|
if (urlErr) {
|
||||||
const decoded = decodeURIComponent(urlErr);
|
const decoded = decodeURIComponent(urlErr);
|
||||||
|
|||||||
Reference in New Issue
Block a user