From 50db790375539f36dad6746aedee805f02653b31 Mon Sep 17 00:00:00 2001 From: mahdiyeh-fs <82078941+mahdiyeh-fs@users.noreply.github.com> Date: Tue, 27 Sep 2022 11:08:39 +0330 Subject: [PATCH] Mahdiyeh/ logout client when enable or disable 2FA in different windows (#6062) * logout client when enable or disable 2FA in different windows * use json.parse to check the loginid * remove Uncaught SyntaxError in Json.parse Co-authored-by: Carol Sachdeva <58209918+carol-binary@users.noreply.github.com> --- packages/core/src/App/initStore.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/src/App/initStore.js b/packages/core/src/App/initStore.js index edc495f8d4c8..2842d1e534c6 100644 --- a/packages/core/src/App/initStore.js +++ b/packages/core/src/App/initStore.js @@ -19,6 +19,9 @@ const setStorageEvents = root_store => { break; } case 'active_loginid': + if (localStorage.getItem('active_loginid') === 'null' || !localStorage.getItem('active_loginid')) { + root_store.client.logout(); + } if (document.hidden) { window.location.reload(); }