Next Auth not working in production only

Hey 👋 My auth with Github and Google works great on my dev env, but after deploying my project to Vercel, Next Auth stop working correctly. When I use a provider like Github, I get the error Try signing in with a different account. and in the URL the error is signin?error=Callback. I created 2 apps for OAuth with Github, one for my dev env (redirecting to localhost) and one for the production (redirecting to my Vercel domain). I followed the Next Auth deployment, so I added a secret in my env vars and link it to the secret param in my config. I don't understand why I'm getting this error only on production and not in development 🧐 My repo is here : https://github.com/armandsalle/vote-design The deployed code is here : https://vote-design.vercel.app/ (it's still WIP)
Vote.design
Vote.design
9 Replies
thejessewinton
Do you have any logs when you try to log in? Even just the function logs in Vercel should do; might highlight a more specific error.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
armand.salle
armand.salle2y ago
Is this what you want?
thejessewinton
Yes, does it have any other messages? Try hitting the errors tab.
armand.salle
armand.salle2y ago
It works with my other GH account, I didn't think about testing that!! Yes I revoke my account, but it didn't fix it. I have the problem only with my GH and Google account. Maybe I login too much? the errors tab is awaiting new requests but never stop
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
armand.salle
armand.salle2y ago
Yes, I think too, I will try again tomorrow. Thank you very much for your time and your answers 🙌
Son
Son2y ago
did you solve this, im having the same error
armand.salle
armand.salle2y ago
Yes, I clear my sessions + user + token tables
Want results from more Discord servers?
Add your server