NextAuth basePath works locally but not on Vercel #11133
Unanswered
KentonParton
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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 ashttps://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!This is how the project is setup using App Router, next 14.2.3, next-auth 4.24.7:
layout.js
next-auth-provider.jsx
repo-login-providers.jsx
I created the following dir:
Environment Variables
NEXTAUTH_URL=https://my-vercel-domain/api/repo-auth
GitHub OAuth Callback URL
https://my-vercel-domain/api/repo-auth/callback/github
Beta Was this translation helpful? Give feedback.
All reactions