getCsrfToken Uses Commit URL on Branch Deployments and Causing CLIENT_FETCH_ERROR #11500
Unanswered
RojhatToptamus
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.
-
I'm running into an issue with NextAuth's getCsrfToken function on Vercel branch deployments. It seems to use the deployment URL (commit-based URL) instead of the branch URL(branc-name.vercel.app), which is causing CLIENT_FETCH_ERROR on branch links. Btw as recommended, the NextAuth URL is not defined on the Vercel deployments, but looks like it is using the wrong path on the fetchData which is called by getCsrfToken.
Error Details
Here's the authorization function:
I would appreciate any help on how to resolve this issue.
Beta Was this translation helpful? Give feedback.
All reactions