Next.js Discord

Discord Forum

Try signing in with a different account - NextAuth OAuthCallback error with SST

Unanswered
Corn Crake posted this in #help-forum
Open in Discord
Corn CrakeOP
So I'm deploying an application with nextauth integration to authenticate users with Google. Works perfectly fine locally and running the build, but crashes on signin in when deployed with SST saying "Try signing in with a different account". Also when I go to / of my page I see that the urlCallback goes to this value /api/auth/signin?callbackUrl=%2F%3F%3Dundefined which is not okay.

Any idea why is this happening? I've tried many things but it's hard to tell . My NEXTAUTH_URL is set to the canonical URL.

0 Replies