You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after the auth0 sign in, the browser is being redirected to https://my-app.vercel.app/api/auth/callback/auth0 even though my NEXTAUTH_URL is set to https://my-app.vercel.app/app/api/auth.
In localhost it works as expected and the app redirects to http://localhost:3000/app/api/auth/callback/auth0.
How to reproduce
Clone the repo
Set it up to deploy on Vercel
set the environment variables:
NEXT_PUBLIC_BASE_PATH=/app
AUTH0_CLIENT_ID=xxx
AUTH0_CLIENT_SECRET=xxx
AUTH0_ENDPOINT=https://xxx.com
NEXTAUTH_URL=https://my-app.vercel.app/app/api/auth (switch to your app's Vercel domain)
NEXTAUTH_SECRET=xxx
deploy the app
the callbackUrl will not include the basePath and it will show 404
Expected behavior
The callbackUrl should include the basePath (as it is set in the NEXTAUTH_URL)
Additional info
I also tried to set the redirectUri manually, but without success: commit
Provider type
Auth0
Environment
Reproduction URL
https://github.com/ss-ravi/auth0-provider-test
Describe the issue
after the auth0 sign in, the browser is being redirected to
https://my-app.vercel.app/api/auth/callback/auth0
even though myNEXTAUTH_URL
is set tohttps://my-app.vercel.app/app/api/auth
.In localhost it works as expected and the app redirects to
http://localhost:3000/app/api/auth/callback/auth0
.How to reproduce
NEXT_PUBLIC_BASE_PATH=/app
AUTH0_CLIENT_ID=xxx
AUTH0_CLIENT_SECRET=xxx
AUTH0_ENDPOINT=https://xxx.com
NEXTAUTH_URL=https://my-app.vercel.app/app/api/auth
(switch to your app's Vercel domain)NEXTAUTH_SECRET=xxx
Expected behavior
The callbackUrl should include the basePath (as it is set in the
NEXTAUTH_URL
)Additional info
I also tried to set the redirectUri manually, but without success: commit
Relevant code
The text was updated successfully, but these errors were encountered: