Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For session, sent cookie same site based on the value of apiDomain and websiteDomain #63

Closed
rishabhpoddar opened this issue Jan 5, 2021 · 1 comment
Assignees

Comments

@rishabhpoddar
Copy link
Contributor

rishabhpoddar commented Jan 5, 2021

  • If the values are different (no common top level domain), then set cookieSameSite to none by default, else set it to lax.
  • If setting it to none, also set anti-csrf to true somehow.
  • Set cookieSecure to true by default if the apiDomain has https
@rishabhpoddar
Copy link
Contributor Author

  • If the websiteDomain and the apiDomain are localhost, even if the ports are different, lax is allowed.
  • Do some research on what sameSite lax is allowed.
  • If based on the websiteDomain and apiDomain, sameSite is none, then the cookieSecure flag must be resulting in true. Note that the cookieSecure's value is only based on if https or http is present in the apiDomain. If it's false in this case, then thrown an error: "Since your API and website domain are different, for sessions to work, please use https on your apiDomain".

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

No branches or pull requests

2 participants