Skip to content

Commit 7070e5a

Browse files
iQQBotona-agent
andcommitted
fix cookie
Co-authored-by: Ona <[email protected]>
1 parent d059c2a commit 7070e5a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

components/server/src/auth/nonce-service.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ export class NonceService {
3030
res.cookie(NONCE_COOKIE_NAME, nonce, {
3131
httpOnly: true,
3232
secure: this.config.auth.session.cookie.secure,
33-
sameSite: "strict", // Strict for CSRF protection
33+
sameSite: "lax", // Strict for CSRF protection
3434
maxAge: 5 * 60 * 1000, // 5 minutes (same as JWT state expiry)
35+
path: "/",
3536
});
3637
}
3738

@@ -49,8 +50,8 @@ export class NonceService {
4950
res.clearCookie(NONCE_COOKIE_NAME, {
5051
httpOnly: true,
5152
secure: this.config.auth.session.cookie.secure,
52-
sameSite: "strict",
53-
path: "/auth",
53+
sameSite: "lax",
54+
path: "/",
5455
});
5556
}
5657

0 commit comments

Comments
 (0)