0

Am using MsAdalAngular6Service in My Angular 6 application. Issue is when we open the application in multiple tables, Then If I log out in tab , the user needs to be logged out in all other tabs as well.Currently use is being logged out only in one tab.

In my Log out Am calling msdal.logout().

Thanks for the help.

  • can you be given more clearly your query? – Nagender Pratap Chauhan May 30 '19 at 11:23
  • @nagenderpratapchauhan I have logged in to my Angular 6 application in multiple tabs. For the Azure AD Authentication I have used MsAdalAngular6Service. SO, Once the user is Logged in , he can access my application. My need is, if the same user is logged out of the application in one of the open tab,then He should not be able to access my application in any other Opened tabs. But here in my case, he is still able to access my application I have tried using msdal.logout() in my Logout function. But it is logging out the user only in the current active tab, but not from other tabs in the browser – Santosh Shiva Kumar May 30 '19 at 11:29

1 Answers1

0

You will need to watch for localStorage change event, refer to this stackoverflow thread.

Then check if the values that changed were the ones you want (token, credentials, etc.) and execute the logout service.

Jalu
  • 332
  • 3
  • 13