Unstable sign out
Hi,
We have an issue in the up to date version of @okta libs (4.1.0 for @okta/okta-react and 4.6.1 for @okta/okta-auth-js). We use OKTA-hosted login page.
Repro steps:
- open several tabs of the same SPA with a logged in user;
- click Sign out in one of the tabs;
- under the hood we call
void oktaAuth.signOut();and that's it;
Actual result:
- you get redirected to the OKTA-hosted log in screen, but other tabs just reload (there's some action visible) but when you switch to them - you are still logged in, and you can use the creds stored (they are still in place in
localStorage, things likeokta-token-storageand others) and navigate the application; OR - you get redirected to the OKTA-hosted log in screen in the current and all other open tabs as well; (expected result)
The two above scenarios happen unstably one or another, like 50/50.
It seems like there's some kind of a race condition, or maybe some dependency on the random order of events emitted internally by OKTA on localStorage update.
@estorski Thanks for reporting the issue! I'll investigate on the issue, meanwhile, can I know the browser and the version that you can repro the issue?
Internal Ref: OKTA-364608
Hey @shuowu
The browser is Chrome Version 87.0.4280.141 (Official Build) (64-bit)
@estorski I am not able to reproduce the issue with our react sample app. Please feel free to reach out to our support staff at [email protected] to collect reproduction details.
Hello, @shuowu @estorski I have the same issue. libs (5.1.1 for @okta/okta-react and 4.9.0 for @okta/okta-auth-js). Maybe we could create a shared codesandbox and try to reproduce it.
Relates to #148
Try workaround: https://github.com/okta/okta-react/issues/148#issuecomment-951019063