How to logout from all tabs immediately? #1059
-
How to logout from all tabs immediately? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The current implementation doesn't have any auto logout. So if the user opens multiple tabs and presses logout in one tab, other tabs will stay logged in unless the user makes any API request or moves to another page (route). So the solution can be to check every sec if This feature, I'll consider. If I think, this feature has potential, I'll implement in the library itself But for now you have to implement by yourself. Thanks |
Beta Was this translation helpful? Give feedback.
-
I think such behavior could be achieved by implementing WebSockets and publishing signout events. In that case, every other tab would know that signout just happened and could update accordingly. |
Beta Was this translation helpful? Give feedback.
The current implementation doesn't have any auto logout. So if the user opens multiple tabs and presses logout in one tab, other tabs will stay logged in unless the user makes any API request or moves to another page (route).
So the solution can be to check every sec if
isAuthenticated
is returningtrue
or not inside asetInterval
. If it's not returning true, you can simply redirect the user to your desired page.This feature, I'll consider. If I think, this feature has potential, I'll implement in the library itself But for now you have to implement by yourself.
Thanks