Skip to content

update cookie config - #2876

Open
whitneywind wants to merge 2 commits into
developfrom
jwt-cookie-security-fix
Open

update cookie config#2876
whitneywind wants to merge 2 commits into
developfrom
jwt-cookie-security-fix

Conversation

@whitneywind

Copy link
Copy Markdown
Member

This should be merged after #2873 (CORS allow-list) since sameSite: "none" cookies are only safe to send cross-origin once CORS stops reflecting arbitrary origins

  • Set httpOnly: true on the JWT session cookie to prevent client-side JS or XSS from reading it via document.cookie
  • Replaced sameSite: req.secure ? "none" : undefined with req.secure ? "none" : "lax" since "none" preserves cross-origin cookie auth needed for multi-tenant frontends

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant