We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0182272 commit ca362d7Copy full SHA for ca362d7
plainstack/src/auth.ts
@@ -14,7 +14,6 @@ export function protect<User>({
14
session?: Session;
15
};
16
}>(async (c, next) => {
17
- if (c.get("user")) return c.redirect(signinPath);
18
const userId = c.get("session")?.get("user-id") as string | undefined;
19
if (!userId) return c.redirect(signinPath);
20
const user = await getUser(userId);
@@ -37,7 +36,6 @@ export function signin<User>({
37
36
38
39
40
- if (c.get("user")) return c.redirect(protectedPath);
41
42
const user = userId ? await getUser(userId) : undefined;
43
if (user) return c.redirect(protectedPath);
0 commit comments