-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sign-out no longer triggers consistently on all open tabs to end session #49
Comments
Thanks for the repro steps and a demo @martyngroberts. There is a chance this issue has a same root cause as #47 as cross-tab storage sync is enabled by token service which does not currently start during login redirect. Internal Ref: OKTA-412078 |
hi @oleksandrpravosudko-okta i can confirm the issue still exists in v3.2.1 I have recorded the behaviour in this video - https://www.loom.com/share/4e1f8e6e538b4503ad61343e90b318bc The key thing to observe is that whilst a initiate logout on one tab, you will see the first tab carries out a refresh of the token and hence both tabs remain in authenticated state. This can be replicated with fresh session in incognito. |
FWIW I cannot reproduce this behavior in 3.2.1 nor 3.2.2 using neither the okta-hosted-login nor custom-login samples: https://github.com/okta/samples-js-angular All tokens in local storage are cleared on logout across all tabs. Chrome on Mac. |
I was able to reproduce this issue with 3.2.2 - thanks for catching this @martyngroberts! A permanent fix for this issue will likely require a breaking change in our SDK(s) - we intend to put it into next major release. async function onAuthRequired(oktaAuth, _) {
window.location.assign('/login');
} UPD: snippet changed to navigate to custom login page instead of doing sign out |
It is observed that if a user has two authenticated sessions running on separate tabs for an app integrated with Angular SDK (3.2.0), logging out will not consistently end the session correctly on the other tab. On some occasions the other tab will not detect the logout and on other occasions the page reload happens quicker than the first tab completing logout and access token is actually renewed, keeping session alive in both tabs.
This has been verified using the following;
Steps to recreate
Repeat this process multiple times. One of three outcomes happens inconsistently, suggesting race condition;
Note that this behaviour has also been observed by another team who implemented the SDK, here is a video
The text was updated successfully, but these errors were encountered: