Next Auth Production Issue

I have a web app using session auth of NextAuth for authentication. It works fine locally, however, when deployed to Vercel, it errors out when logging in via Email Provider or Credentials. I am getting this weird error: In the console:
SyntaxError: Unexpected token 'A', "An error o"... is not valid JSON
SyntaxError: Unexpected token 'A', "An error o"... is not valid JSON
In network tab: StatusCode: 504 Request: Post RequestURL: https://<myappname>.vercel.app/api/auth/signin/email? Payload:
email: <myemail>@outlook.com
csrfToken: 40e860911c6388162f02e7df9ba7ad9d42b63344769c16ab9e1f2a6025d968cc
callbackUrl: https://<myappname>.vercel.app/auth
json: true
email: <myemail>@outlook.com
csrfToken: 40e860911c6388162f02e7df9ba7ad9d42b63344769c16ab9e1f2a6025d968cc
callbackUrl: https://<myappname>.vercel.app/auth
json: true
Response: An error occurred with your deployment FUNCTION_INVOCATION_TIMEOUT
1 Reply
Typedef
TypedefOP2y ago
Turns out I needed to put access to everyone on mongodb
Want results from more Discord servers?
Add your server