Skip to content

Commit 5d89e5d

Browse files
committed
improvement: Update cookie maxAge to 1 hour for authentication token
1 parent 87db1c6 commit 5d89e5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/contexts/AuthContext.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
4848
const { user, jwt } = await signInRequest({ email, password });
4949

5050
setCookie(undefined, "nextauth.token", jwt, {
51-
// maxAge: 60 * 60 * 1 // 1 hour
52-
maxAge: 180 // 3 minutes
51+
maxAge: 60 * 60 * 1 // 1 hour
52+
// maxAge: 60 * 60 * 24 * 1 // 1 day
5353
});
5454

5555
setUser(user);

0 commit comments

Comments
 (0)