AzureAD / microsoft-authentication-library-for-js

Microsoft Authentication Library (MSAL) for JS
http://aka.ms/aadv2
MIT License
3.64k stars 2.65k forks source link

MSAL.js 1.4.6 single sign out with Multiple tabs #3244

Closed maacaro closed 3 years ago

maacaro commented 3 years ago

Library

Description

is there a way to sign out at once in multiples tabs? I am running into a situation where the user login in tab1 then the user open another tab for the same app, then the user logout on tab1 while the user is still logged in tab2, then the user reload tab 2 and still logged,

Source

tnorling commented 3 years ago

@maacaro Are you using local or session storage? If you're using local storage cache should be cleared for both tabs when you log out of one. If you're using session storage each tab has it's own storage so the only way to clear tab 2 would be to either close the window or call logout on that tab as well.

maacaro commented 3 years ago

@tnorling thanks you, I changed session storage by local storage, and it works

tnorling commented 3 years ago

Great, thanks for the update!