Merge pull request #43701 from nextcloud/fix/noid/logout-loop

Stop the auto-logout loop after redirecting to the logout page
pull/42347/merge
Julius Härtl 2024-02-20 21:53:22 +07:00 committed by GitHub
commit 2189baa60d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 5 deletions

@ -128,14 +128,17 @@ const registerAutoLogout = () => {
lastActive = e.newValue
})
setInterval(function() {
let intervalId = 0
const logoutCheck = () => {
const timeout = Date.now() - config.session_lifetime * 1000
if (lastActive < timeout) {
clearTimeout(intervalId)
console.info('Inactivity timout reached, logging out')
const logoutUrl = generateUrl('/logout') + '?requesttoken=' + encodeURIComponent(getRequestToken())
window.location = logoutUrl
}
}, 1000)
}
intervalId = setInterval(logoutCheck, 1000)
}
/**

4
dist/core-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long