diff --git a/infra/authentik/custom-templates/base/header_js.html b/infra/authentik/custom-templates/base/header_js.html index f34e333..7f1f237 100644 --- a/infra/authentik/custom-templates/base/header_js.html +++ b/infra/authentik/custom-templates/base/header_js.html @@ -303,6 +303,7 @@ const redirectUrl = getSafePostLogoutRedirect(); if (!redirectUrl) return; + const isInvalidationFlow = window.location.pathname.includes("/if/flow/default-invalidation-flow"); const text = root.textContent || ""; const logoutComplete = [ "Logout successful", @@ -313,13 +314,13 @@ "Выход выполнен", ].some((message) => text.includes(message)); - if (!logoutComplete) return; + if (!logoutComplete && !isInvalidationFlow) return; document.body.dataset.nodedcLogoutRedirected = "true"; document.body.classList.add("nodedc-auth-submitting"); window.setTimeout(() => { window.location.replace(redirectUrl); - }, 150); + }, isInvalidationFlow ? 1600 : 150); } let scheduled = false;