Vercel Preview Deployment Issues with @auth0/nextjs


I have cloned and gotten the @auth0/nextjs example with the kitchen-sink-example working with separate auth0 and vercel accounts. I was able to use AUTH0_BASE_URL=${VERCEL_GIT_REPO_SLUG}-git-${VERCEL_GIT_COMMIT_REF}-${VERCEL_GIT_REPO_OWNER} in my .env.production and everything was fine. Within auth0 for the kitchen sink example I set my Allowed Callback URLS to https://* and Allowed Logout URLs to https://*

I have tried my best to recreate this in my actual repo for a project and I seem to be running to issues with auth0 not respecting my Allowed Callback URLs.

Here is my dynamic redirect_uri that is being set as a result of the .env.production. Below it is the exact name of the Vercel deployment and the corresponding Callback URL.

You can see they are identical and I would expect this to work. However, I get the error message that this redirect-uri is not in the list of allowed callback URLs.

The Allowed Callback URL list is the same as what I showed above. Even when I explicitly add I still get that same issue. Any help or guidance would be greatly appreciated!

Hey there!

The most effective way to handle that would be to tackle it through opening a GitHub issue in the @auth0/nextjs repo so we can address that directly with the repo maintainers. Once you have a link to it you can share it here so we can ping them. Thank you!

1 Like