user to logout if browser tab/window is closed after getting idle timeout popup on screen without choosing options to extend /end

56 Views Asked by At
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.

0

There are 0 best solutions below