Next.js Discord

Discord Forum

Next-Auth hosting to vercel.

Unanswered
Verin posted this in #help-forum
Open in Discord
next-auth use the credentials and google OAuth, both of them works well on local pc.
After deploying it to the vercel, I've got this error.
What the problem is?

16 Replies

Plott Hound
what is the error?
did you correctly set the env vars on vercel?
eg in your local dev env it would be something like this:

AUTH_URL="http://localhost:3000"
AUTH_SECRET="localsecret"


and in prod it would be:
AUTH_URL="http://mydomain.com"
AUTH_SECRET="prodsecret"
also you need to make for each auth provider eg github you have two apps, one for dev and one for prod since the callback url will be different for each
oh yes?
Will you guide via screen?
Plott Hound
no im at work sorry
did you check my suggestions?
Wrong?
@Verin Wrong?
Plott Hound
Looks right to me
This is working well on local but not on the host.
Plott Hound
What are the actual errors you are getting?
next-auth signin is not working.
Google OAuth is not working too.
This is Gmail Auth result