Skip to content

Commit c8d0c24

Browse files
committed
logout
1 parent 5350aeb commit c8d0c24

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/interactive/UserMenu.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export default function UserMenu({ directusUrl, provider = "authentik" }: Props)
7676
}
7777

7878
const onLogout = async () => {
79+
// logout directus
7980
try {
8081
const res = await fetch(`${directusUrl}/auth/logout`, {
8182
method: "POST",
@@ -89,9 +90,10 @@ export default function UserMenu({ directusUrl, provider = "authentik" }: Props)
8990
console.error("Logout failed:", res.status, txt);
9091
return;
9192
}
92-
// reload page
93-
window.location.reload();
9493

94+
// logout authentik
95+
// TODO fix redirect
96+
window.location.href = "https://authentik.bounteer.com/if/flow/default-invalidation-flow/?next=https://bounteer.com";
9597
} catch (e) {
9698
console.error("Logout error:", e);
9799
}

0 commit comments

Comments
 (0)