1
0
forked from wrenn/wrenn

Redirect authenticated users away from login page

This commit is contained in:
2026-04-16 04:30:25 +06:00
parent 43e838c55c
commit 084c6caa7d

View File

@ -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);