Skip to content

Support cross-site cookies in sample cookie config#253

Open
sgerrand wants to merge 1 commit intopow-auth:mainfrom
sgerrand:docs-sane-defaults-for-sample-cookie-config
Open

Support cross-site cookies in sample cookie config#253
sgerrand wants to merge 1 commit intopow-auth:mainfrom
sgerrand:docs-sane-defaults-for-sample-cookie-config

Conversation

@sgerrand
Copy link
Copy Markdown

💁 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