From af292fdb80977d4cef1924003b5539da5b8786a8 Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Sat, 11 Mar 2023 17:42:27 +0100 Subject: [PATCH] only keep session alive if page is not hidden --- client/src/App.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/App.vue b/client/src/App.vue index 26f31c4..53c4243 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -63,7 +63,7 @@ onMounted(async() => { setup(UnauthorizedCallback); await checkAuth(); setInterval(function () { - if (authState === AuthState.Authenticated) { + if (authState === AuthState.Authenticated && !document.hidden) { checkAuth(); } }.bind(this), 120000);