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 staging login redirect loop #226

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Conversation

codetheweb
Copy link
Contributor

Apparently next auth uses a different cookie name for HTTPS origins.

Apparently next auth uses a different cookie name for HTTPS origins.
@codetheweb codetheweb marked this pull request as ready for review October 26, 2023 05:28
Copy link
Contributor

@tessathornberry tessathornberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are getting an "API handler should not return a value, received object." in the terminal console, but that is from the previous PR.

if (!request.cookies.get("next-auth.session-token")) {
const sessionToken =
request.cookies.get("next-auth.session-token") ??
request.cookies.get("__Secure-next-auth.session-token");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the fascinating intricacies of various frameworks.
Thanks for fixing this, @codetheweb

@codetheweb codetheweb merged commit ba93694 into main Oct 30, 2023
@codetheweb codetheweb deleted the fix-staging-redirect-loop branch October 30, 2023 03:54
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.

2 participants