You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
I am using ng-idle in my Angularjs 1.5.x . I am warning the user that his/her Session expires with a alert() box . When i do this the timeout does not trigger until the alert is responded to . app.run(function ($rootScope, Idle) { Idle.watch(); $rootScope.$on('IdleTimeout', function () { // end their session and redirect to login. console.log('Session expired'); globalThis._adalInstance.logOut(); }); $rootScope.$on('IdleStart', function () { console.log('IDLE'); alert("Your session is about to expire. Please click anywhere on the page to avoid being logged out."); }); });
The text was updated successfully, but these errors were encountered:
I think that is a browser limitation, while the alert box is displayed the thread is held in suspension. This is why you shouldn't use alert boxes in modern UI javascript code.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am using ng-idle in my Angularjs 1.5.x . I am warning the user that his/her Session expires with a alert() box . When i do this the timeout does not trigger until the alert is responded to .
app.run(function ($rootScope, Idle) {
Idle.watch();
$rootScope.$on('IdleTimeout', function () {
// end their session and redirect to login.
console.log('Session expired');
globalThis._adalInstance.logOut();
});
$rootScope.$on('IdleStart', function () {
console.log('IDLE');
alert("Your session is about to expire. Please click anywhere on the page to avoid being logged out.");
});
});
The text was updated successfully, but these errors were encountered: