diff --git a/src/composables/useSession.js b/src/composables/useSession.js index f308bf3e2..bd3532816 100644 --- a/src/composables/useSession.js +++ b/src/composables/useSession.js @@ -90,6 +90,7 @@ export function useSession() { await useRole().fetch(); await useUserConfig().fetch(); await useTokenConfig().fetch(); + startInterval(); } @@ -105,8 +106,6 @@ export function useSession() { const renewPeriod = +sessionStorage.getItem('renewPeriod'); if (!renewPeriod) return; intervalId = setInterval(() => checkValidity(), renewPeriod * 1000); - // JUST FOR TEST - // checkValidity(); } function stopRenewer() { @@ -144,10 +143,8 @@ export function useSession() { //COMMENT THIS IF JUST FOR TEST if (isNaN(renewPeriodInSeconds) || now <= maxDate) { - console.error('Token not renewed'); return (isCheckingToken = false); } - console.error('Token renewed'); await renewToken(); isCheckingToken = false;