Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
27 replies
Xaohs

Weird next-auth behaviour

I have a weird issue happening lately with next-auth.
Whenever I call signIn('provider') , I get redirected to /api/auth/signin, and if on that page I click on whichever provider, I get redirected again to this same page. No errors are logged, even with debug: true set in nextAuth itself. On localhost, everything runs fine, even with a ngrok setup on top of it. I've already stripped away all of my custom configurations of next-auth, double checked my
.env
variables which seem to be in line with my production server (that is running fine). And the problem can't lie in the provider itself, as it's happening with every single provider, + email login (which doesn't trigger any of the next-auth stuff, and just redirects me back to /api/auth/signin.

Would anybody know where I can continue to debug this?

My environment runs on:
- VPS setup with NGINX
- A subdomain (staging.domain.com)
- Cloudflare
Was this page helpful?