diff --git a/plainstack/src/auth.ts b/plainstack/src/auth.ts index b91db22..9f8c8a6 100644 --- a/plainstack/src/auth.ts +++ b/plainstack/src/auth.ts @@ -14,7 +14,6 @@ export function protect({ session?: Session; }; }>(async (c, next) => { - if (c.get("user")) return c.redirect(signinPath); const userId = c.get("session")?.get("user-id") as string | undefined; if (!userId) return c.redirect(signinPath); const user = await getUser(userId); @@ -37,7 +36,6 @@ export function signin({ session?: Session; }; }>(async (c, next) => { - if (c.get("user")) return c.redirect(protectedPath); const userId = c.get("session")?.get("user-id") as string | undefined; const user = userId ? await getUser(userId) : undefined; if (user) return c.redirect(protectedPath);