Is there a feature in @auth0/auth0-vue to communicate logout to different tabs in an SPA app using a refresh token?

If I am using a refresh token, I would like to know if @auth0/auth0-vue has a feature to communicate logout status to different tabs.
Currently, I am building an SPA application using @auth0/auth0-vue.
I want to ensure that when a user logs out in one tab, they are also logged out in another tab.
However, I’m facing difficulties detecting logout due to the following reasons:

Since the token is saved in memory, isAuthenticated relies on the InMemoryCache class, which doesn’t return the expected value.
Since I’m using a refresh token, even if the access token’s expiration is shortened and another tab logs out, the access token can still be retrieved.
While I can detect logout in different tabs by directly referencing the Cookie value or using WebSocket, I would prefer to use a built-in feature in @auth0/auth0-vue to handle logout across tabs.
Based on the above, I have two questions:
Question 1: Does @auth0/auth0-vue have a feature to detect logout in different tabs when using a refresh token?
Question 2: If the feature doesn’t exist, is referencing the Cookie value or using WebSocket to notify logout the recommended approach by Auth0?

I would appreciate your response. Thank you very much.

1 Like