Next.js Discord

Discord Forum

NextAuth basePath works locally but not on Vercel

Unanswered
Atlantic mackerel posted this in #help-forum
Open in Discord
Atlantic mackerelOP
Hi all, I am running into a uri_mismatch error on Vercel but it works perfectly locally while using basePath. Locally, the callback URL is correctly included as https://my-vercel-domain/api/repo-auth/callback/github but when running on Vercel, the callback URL is https://my-vercel-domain/api/auth/callback/github. Some help would be much appreciated!

Link to discussion:
https://github.com/nextauthjs/next-auth/discussions/11133

1 Reply

Atlantic mackerelOP
Would really appreciate some help 🙏