From e8f72178b2fe6a85edcf5bc879201c2398f22b24 Mon Sep 17 00:00:00 2001 From: "Nic D." <91558719+Venti-Bear@users.noreply.github.com> Date: Mon, 26 Jan 2026 16:27:54 -0500 Subject: [PATCH] refactor(auth): change behavior of disconnect button, now ends authentik session for app only --- src/stores/auth-store.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/stores/auth-store.ts b/src/stores/auth-store.ts index 3eecc6f..cee85c7 100644 --- a/src/stores/auth-store.ts +++ b/src/stores/auth-store.ts @@ -31,6 +31,10 @@ export const useAuthStore = defineStore('auth', () => { const logout = () => { user.value = undefined; + AuthService.logout(); + const logout_popup = window.open('https://auth.targo.ca/application/o/montargo/end-session/', 'logoutPopup', 'width=200,height=200'); + + setInterval(() => logout_popup?.close(), 2000); }; const handleAuthMessage = async (event: MessageEvent) => { @@ -61,13 +65,13 @@ export const useAuthStore = defineStore('auth', () => { return { status: 400, message: 'unknown error occured' }; } - return { - user, - authError, - login, - oidcLogin, - logout, - getProfile + return { + user, + authError, + login, + oidcLogin, + logout, + getProfile }; });