-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
AuthRelated to Auth components/categoryRelated to Auth components/categoryfeature-requestRequest a new featureRequest a new feature
Description
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 and signedOut is only sent to the current browser tab/window. Hence the useAuthenticator hook does not change session state from the sign-in or sign-out action from other tab.
I expect the following to work:
- Open tab 1 of example.com and render unauthenticated scene.
- Open tab 2 of example.com/sign-in and completes sign-in flow
- Both tabs rerender the authenticated scene automatically.
Describe the solution you'd like
The Hub listener can opt to listen to cross tab events:
Hub.listen('auth', callback, { fromCrossTab: true });
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?
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
israx, ericlo23, OrmEmbaar and wasib-sureify
Metadata
Metadata
Assignees
Labels
AuthRelated to Auth components/categoryRelated to Auth components/categoryfeature-requestRequest a new featureRequest a new feature