-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signout only works after some time has passed #1538
Comments
On vercel's real-time function log I get this error every time I try to sign out. 20:23:47:56 |
@mikeyim337 I think I found the problem, thanks to your additional log information from Vercel! Thank you! |
🎉 This issue has been resolved in version 3.13.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thank you for the reply. This fix did clear up all the errors from vercel's logger, but I still get the client_fetch_error and csrf token as undefined in my signout request, so I'm still unable to sign out. In the network tab I find that my csrf request keeps getting canceled and returns 304 instead of 200 OK. my nextauth url is NEXTAUTH_URL=https://mydomain.org/ in .env.production. Thanks for the help. Please reopen this issue if you can. |
Figured it out. I put the onclick signout method on a live link so it was redirecting before it could sign out. Oops! |
Awesome, thanks for reporting back! |
🎉 This issue has been resolved in version 4.0.0-next.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Your question
I'm having a hard time getting signout to work.
Signin and signout work in development and this bug happens only in production. When I give my app some time to idle and then try to sign out then it SOMETIMES works.
The error message I get is:
[next-auth][error][client_fetch_error]
https://next-auth.js.org/errors#client_fetch_error csrf TypeError: Failed to fetch
and also:
Uncaught (in promise) TypeError: Failed to fetch
The network console shows signout request as pending and its form data's csrfToken as undefined
Just in case this is relevant, I am using a custom login page and I find that even when I'm signing in with facebook the request gets the EmailSignin error. But facebook oauth still goes through and also this sign out issue occurs when I have signed in with email too, so I'm not sure.
Thank you very much and any help would be greatly appreciated.
What are you trying to do
I am trying to get signout to work.
Reproduction
Feedback
Documentation refers to searching through online documentation, code comments and issue history. The example project refers to next-auth-example.
The text was updated successfully, but these errors were encountered: