auth: use samesite=lax for oauth cookies #3158
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Fixes a regression that prevents login when redirecting from an OIDC server by setting
SameSite=Lax
for OAuth cookies, and retainingSameSite=Strict
for the session cookie.Additional Info:
SameSite=None
: Cookies will be sent in all contexts. This was how cookies worked by default prior to the SameSite attribute implementation.SameSite=Lax
: Cookies are not sent on normal cross-site subrequests (for example, to load images or frames into a third-party site), but are sent when a user is navigating to the origin site. This is the default value in modern browsers if the attribute is not specified.SameSite=Strict
: Cookies will only be sent in a first-party context and not be sent along with requests initiated by third-party websites. This means that the cookies won't be sent if the user is not already on your site.