From f599c4df94ac09fdaec028decb7357bf38857c5b Mon Sep 17 00:00:00 2001
From: Leonardo <leomilho@gmail.com>
Date: Mon, 2 Dec 2024 17:27:01 +0100
Subject: [PATCH] fix(logout): use the proper invalidation flow for logout

---
 apps/web/src/components/navbar/navbar.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/apps/web/src/components/navbar/navbar.tsx b/apps/web/src/components/navbar/navbar.tsx
index 1c17a0b31..1ef0aa20e 100644
--- a/apps/web/src/components/navbar/navbar.tsx
+++ b/apps/web/src/components/navbar/navbar.tsx
@@ -105,7 +105,8 @@ export const Navbar = () => {
                   <DropdownItem
                     value="Log out"
                     onClick={() => {
-                      location.replace(`${getEnvVariable('GP_AUTH_URL')}/outpost.goauthentik.io/sign_out`);
+                      const current = new URL(window.location.href);
+                      location.replace(`${getEnvVariable('GP_AUTH_URL')}if/flow/default-invalidation-flow/?next=${current.toString()}`);
                     }}
                   />
                   {authCache.authorization?.demoUser?.R && (
-- 
GitLab