Open shashankkrjain opened 8 years ago
Check if your lock screen modal exists in document then don't startSessionTimer in bootstrap-session-timer.js. Hope this helps you.
function startSessionTimer() { //***check if login dialog exists then don't reset timer**** if ($('#loginModal').length == 0) {
// Clear session timer
clearTimeout(timer);
if (opt.countdownMessage || opt.countdownBar) {
startCountdownTimer('session', true);
}
if (typeof opt.onStart === 'function') {
opt.onStart(opt);
}
// If keepAlive option is set to "true", ping the "keepAliveUrl" url
if (opt.keepAlive) {
keepAlive();
}
// Set session timer
timer = setTimeout(function () {
// Check for onWarn callback function and if there is none, launch dialog
if (typeof opt.onWarn !== 'function') {
$('#session-timeout-dialog').modal('show');
} else {
opt.onWarn(opt);
}
// Start dialog timer
startDialogTimer();
}, opt.warnAfter);
}
}
The timer should stop after onRedir function has finished execution. Effectively when the whole sessionTimeout cycle has finished once.
The problem is, in our application, we show lock screen modal on the same page, and not redirect user to lock screen page. Now, what happens is, the timer keeps running and shows session timeout warning again.