Next.js Discord

Discord Forum

Next Auth custom basePath not working when deployed to Vercel

Unanswered
Dickcissel posted this in #help-forum
Open in Discord
DickcisselOP
We are trying to set a custom base path for next-auth and move it from /api/auth to /api/next-auth locally it works fine both in dev and built, but when deployed to vercel it keeps setting /api/auth in the redirect URI of the oauth providers.

We have set basePath on the SessionProvider to be /api/next-auth
And NEXTAUTH_URL=https://domain.com/api/next-auth

But when deployed to Vercel, it keeps setting https://domains.com/api/auth on the redirectURI

0 Replies