Open AllanZhengYP opened 8 months ago
Thanks for opening this @AllanZhengYP. Labeling this as a feature request and this behavior is consistent in both v5 and v6. Anyone who sees this/experiences this, feel free to upvote this issue and provide more context!
I am facing the same issue. I would like for this support to be added to the Hub listener.
Is this related to a new or existing framework?
No response
Is this related to a new or existing API?
Authentication
Is this related to another service?
No response
Describe the feature you'd like to request
Currently the Hub event
signedIn
andsignedOut
is only sent to the current browser tab/window. Hence theuseAuthenticator
hook does not change session state from the sign-in or sign-out action from other tab.I expect the following to work:
Describe the solution you'd like
The Hub listener can opt to listen to cross tab events:
Now you are listening to other tabs.
Under the hood it can listen to the cookie/local storage events and looking for user session changes.
Describe alternatives you've considered
Right now users have to refresh to render the effects from the signedIn and signedOut events from other tabs.
Additional context
No response
Is this something that you'd be interested in working on?