redirect user to login when session expired

This commit is contained in:
EQUILIBRIUM\hirondino.van-dunem
2022-06-10 14:52:05 +01:00
parent 64a27f0bb1
commit 6895b58930
3 changed files with 14 additions and 6 deletions
+4 -3
View File
@@ -11,7 +11,7 @@ export class InativityService {
private router: Router,
) {
var t;
var time;
window.onload = resetTimer;
window.onmousemove = resetTimer;
window.onmousedown = resetTimer; // catches touchscreen presses as well
@@ -28,8 +28,9 @@ export class InativityService {
}
function resetTimer() {
clearTimeout(t);
t = setTimeout(userIsNotActive, 60000 * 5); // time is in milliseconds
clearTimeout(time);
// t = setTimeout(userIsNotActive, 60000 * 5); // time is in milliseconds
time = setTimeout(userIsNotActive, 3000);
}
}
}