Issue with v4-beta signOut #2783
-
I have a fully working app using v3 and recently upgraded to 4.0.0-beta.2. I followed the upgrade documents and everything went well except for a small issue I'm having when calling signOut. The issue is that most of the time I have to click the signOut button twice to get signed out. If I sign in and stay on the same page (even with multiple refreshes), I can signOut with a single click, but it seems like if I navigate around to different pages, then try to signOut, I have to click it twice. Edit: It seems like the problem will occur after next does a "[Fast Refresh] rebuilding". I can signOut with a single click if/when I do it before any "[Fast Refresh] rebuilding" happens. The only place I'm using signOut is in my Authbar component in the header (I've commented the only 2 places that got changed from v3.
And in case it matters, here's [...nextauth]:
Has anyone else come across this behavior? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Do you have a consistent reproduction maybe? Can you confirm it is a next-auth bug specifically happening with v4? Can it be a Next.js bug instead? It sounds like the issue is when using the dev server. so in production there are no errors? |
Beta Was this translation helpful? Give feedback.
Do you have a consistent reproduction maybe? Can you confirm it is a next-auth bug specifically happening with v4? Can it be a Next.js bug instead? It sounds like the issue is when using the dev server. so in production there are no errors?