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

Infinite redirect loop after google login #47

Closed
diegosc78 opened this issue Nov 3, 2023 · 4 comments · Fixed by #128
Closed

Infinite redirect loop after google login #47

diegosc78 opened this issue Nov 3, 2023 · 4 comments · Fixed by #128

Comments

@diegosc78
Copy link
Contributor

I've followed the 7 steps in readme, mapping a /etc/host dns name for the application and using it in .env.local

  • Application loads OK
  • Google authentication finishes OK (no errors after login, row in next_auth schema tables, browser redirects)
  • Browser redirects to https://thedomainiveconfigured:3000/es
  • Infinite redirect loop

Any clue?

@jorge-menjivar
Copy link
Owner

Hmm, it looks like an issue with language configuration. It seems like it is trying to go to the Spanish version of the site, which isn't there. I will need to look into it a bit more.

@diegosc78
Copy link
Contributor Author

Thank you very much. I changed browser language preferences to english and it worked. I'll dig a bit to guess how to extend or configure your code for adding new languages or jumping to a default language if it doesn't find browser one. Thanks again

@jorge-menjivar
Copy link
Owner

The project was previously using https://github.com/i18next/next-i18next to support multiple languages. However they do not support the new NextJS app dir so it had to be dropped.

Going forward it would probably be best to stick with the default NextJS implementation documented here https://nextjs.org/docs/app/building-your-application/routing/internationalization or a tool built on top of that

@Pirogiran
Copy link

I can confirm this issue on other languages. My friend had this issue, changing browser language to English fixed it. (Firefox and Chrome tested)

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 a pull request may close this issue.

3 participants