From 7d70ea7c205f3a17f751695104e8bec061555447 Mon Sep 17 00:00:00 2001 From: Giuseppe Graziano Date: Tue, 5 Nov 2024 10:38:17 +0100 Subject: [PATCH] Avoid continuous reload when KC_AUTH_SESSION_HASH expires Closes #34652 Signed-off-by: Giuseppe Graziano --- .../main/resources/theme/base/login/resources/js/authChecker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/src/main/resources/theme/base/login/resources/js/authChecker.js b/themes/src/main/resources/theme/base/login/resources/js/authChecker.js index 92053f843f..8507e71663 100644 --- a/themes/src/main/resources/theme/base/login/resources/js/authChecker.js +++ b/themes/src/main/resources/theme/base/login/resources/js/authChecker.js @@ -36,7 +36,7 @@ export function checkCookiesAndSetTimer(loginRestartUrl) { export function checkAuthSession(pageAuthSessionHash) { setTimeout(() => { const cookieAuthSessionHash = getKcAuthSessionHash(); - if (cookieAuthSessionHash !== pageAuthSessionHash) { + if (cookieAuthSessionHash && cookieAuthSessionHash !== pageAuthSessionHash) { location.reload(); } }, AUTH_SESSION_TIMEOUT_MILLISECS);