onidletimeout.subscribe(=> {
if(confirm('your session is expired. Press 'OK' to refresh or 'cancel' to logout')){
this.document.reload();
}
else{
this.msalService.logout();
}});
this is the code in component.ts file. idle time is 900 seconds. after this time the popup appears.
how to make the user to be logged off once after getting this popup when user directly closes the browser tab or window without selecting options of alert box? If the user opens the application url in other tab after closing timed-out tab, it should not be the previous session. using angular 12+ , dotnet in this.