fix: redirect authenticated users away from login, signup, and password pages

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 15:58:12 +01:00
parent a38883e631
commit 0592d27a15
3 changed files with 15 additions and 0 deletions

View File

@@ -1,4 +1,9 @@
import { redirect } from "@sveltejs/kit";
export async function load({ locals }) { export async function load({ locals }) {
if (locals.authStatus?.authenticated) {
redirect(302, "/me");
}
return { return {
authStatus: locals.authStatus, authStatus: locals.authStatus,
}; };

View File

@@ -1,4 +1,9 @@
import { redirect } from "@sveltejs/kit";
export async function load({ locals }) { export async function load({ locals }) {
if (locals.authStatus?.authenticated) {
redirect(302, "/me");
}
return { return {
authStatus: locals.authStatus, authStatus: locals.authStatus,
}; };

View File

@@ -1,4 +1,9 @@
import { redirect } from "@sveltejs/kit";
export async function load({ locals }) { export async function load({ locals }) {
if (locals.authStatus?.authenticated) {
redirect(302, "/me");
}
return { return {
authStatus: locals.authStatus, authStatus: locals.authStatus,
}; };