Skip to content

Commit

Permalink
lax > strict
Browse files Browse the repository at this point in the history
  • Loading branch information
leerob committed Sep 17, 2024
1 parent f146d69 commit 5cc9d77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/auth/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export async function setSession(user: NewUser) {
cookies().set('session', encryptedSession, {
expires: expiresInOneDay,
httpOnly: true,
secure: true, // Only over HTTPS
sameSite: 'strict', // Prevent CSRF
secure: true,
sameSite: 'lax',
});
}
2 changes: 1 addition & 1 deletion middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function middleware(request: NextRequest) {
}),
httpOnly: true,
secure: true,
sameSite: 'strict',
sameSite: 'lax',
expires: expiresInOneDay,
});
} catch (error) {
Expand Down

0 comments on commit 5cc9d77

Please sign in to comment.