nextauthjs / next-auth

Authentication for the Web.
https://authjs.dev
ISC License
24.86k stars 3.51k forks source link

error 504 on Vercel after sometimes from the deployment #8307

Closed Filpin011 closed 1 year ago

Filpin011 commented 1 year ago

Environment

System: OS: macOS 12.6 CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 84.76 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.16.0 - /usr/local/bin/node npm: 8.11.0 - /usr/local/bin/npm Browsers: Safari: 16.5

Reproduction URL

i don't have a public repository of the project :(

Describe the issue

After sometimes I deploy in production my next's project the login form start to bug and don't send the post request to my FastAPI backend deployed on fly.io, I enable the cors on FastAPI, for some hours after the deploy of my nextjs project the login works very well but after sometime it stop to give me an error and don't make the request. Vercel give me error 504 from the url: /api/auth/callback/credentials I use it as PWA in an iPhone and the UA is: Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1

image

How to reproduce

My authoptions.ts

image

my authmodal.ts where I handle the login

image

Expected behavior

Should login as normal after the axios request, but its slow and continue to loading...

stechx1 commented 9 months ago

Was it solved?

Filpin011 commented 8 months ago

i changed server for the backend, and now is deployed on heroku, before on fly, this fixed the problem.