Next.js Discord

Discord Forum

Next-auth signing out only from 1 tab if multiple tabs open.

Unanswered
Russian Blue posted this in #help-forum
Open in Discord
Russian BlueOP
How can we fix this?

6 Replies

@Russian Blue How can we fix this?
I believe this is something to do with cookies, check the cookies expire
Time
Russian BlueOP
why tho? I'm afraid you misunderstood me, the issue is, if i have ,multiple tabs of my app open (duplicates) and I signout from one, and go again to another tab, I would still be signed in
@Russian Blue why tho? I'm afraid you misunderstood me, the issue is, if i have ,multiple tabs of my app open (duplicates) and I signout from one, and go again to another tab, I would still be signed in
are you using next-auth v4? if so, you might need call router.refresh() after the signOut function due to the router cache
i dont think the router cache can be fixed that easily; router.refresh() only refreshes the current tab not other tabs
oh I didn't realise OP is saying browser tab 😵