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

fix: stop redirect loop caused by TOKEN cookie not sent #48

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

SiCoe
Copy link

@SiCoe SiCoe commented Oct 3, 2023

While the previous change works when authenticating on an external site and then browsing to the site using this module. Redirecting to the site using this module from the authentication site does not work and ends in a 302 redirect loop.

This is caused by the TOKEN cookie having SameSite set to Strict. The browser does not count the /callback?... 302 redirect to / as the same site and therefore does not send the TOKEN cookie.

I've updated the SameSite to Lax for the TOKEN cookie so that it will be sent on the redirect.

@SiCoe SiCoe merged commit bdd68f0 into master Oct 3, 2023
3 checks passed
@SiCoe SiCoe deleted the fix-same-site branch October 3, 2023 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants