Unexpected Token On Client Fetch #2001
-
I have setup NextAuth with my app, and locally, everything works as expected. However, after deploying to Vercel, there are errors with NextAuth, specifically an "Unexpected token < in JSON at position 0" when NextAuth makes the "/api/auth/session" request. Locally, when navigating to that URL, it returns an object, as it should. When I go to that URL with my production domain, it returns an empty page of my app, not the object it should. I can't seem to find any discussions that have this issue, and I'm not sure why it's happening since I don't get any other info from the console other than the unexpected token one. I can try to provide any info needed to figure out why this is happening, just ask for it. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
You will need to provide a reproduction if you expect any help. Check out our official example: https://github.com/nextauthjs/next-auth-example |
Beta Was this translation helpful? Give feedback.
-
@SkelatorIndy were you able to find the issue? I have exactly the same problem |
Beta Was this translation helpful? Give feedback.
You will need to provide a reproduction if you expect any help. Check out our official example: https://github.com/nextauthjs/next-auth-example