Avoid continuous reload when KC_AUTH_SESSION_HASH expires

Closes #34652

Signed-off-by: Giuseppe Graziano <g.graziano94@gmail.com>
This commit is contained in:
Giuseppe Graziano 2024-11-05 10:38:17 +01:00 committed by Marek Posolda
parent cd86405064
commit 7d70ea7c20

View file

@ -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);