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

Support cross-site cookies in sample cookie config #253

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sgerrand
Copy link

💁 Setting the SameSite option to Strict for cookies created during a cross-site authentication process like OAuth2 can easily cause failures which will be somewhat opaque to diagnose and fix. This change to the sample cookie configuration provides a sane default for SameSite which is more closely aligned to Phoenix's default cookie configuration.

See:

Setting the `SameSite` option to `Strict` for cookies created during a cross-site authentication process like OAuth2 can easily cause failures which will be somewhat opaque to diagnose and fix. Provide sane defaults instead for this sample cookie configuration that are more closely aligned to Phoenix's default cookie configuration.

See:
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
- https://github.com/phoenixframework/phoenix/blob/v1.7.18/installer/templates/phx_web/endpoint.ex#L11
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