Skip to content

How to logout from all tabs immediately? #1059

Answered by darkmatter18
DarkBitz asked this question in General
Discussion options

You must be logged in to vote

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 returning true or not inside a setInterval. 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

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by DarkBitz
Comment options

You must be logged in to vote
1 reply
@marcosmarp
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #1058 on September 14, 2022 03:51.