From 0eb488be2ca3c5d0eeff82d89a50188ec451b798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Duch=C3=AAne-Savard?= Date: Thu, 30 Jul 2026 13:54:50 -0400 Subject: [PATCH] session expiration / logout --- frontend/src/App.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 9691baf..4fc1fae 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -7,8 +7,16 @@ const signedIn = computed(() => Boolean(auth.token)) async function signOut () { - clearSession() - await router.push('/') + const token = auth.token + try { + await fetch('/api/signout', { + method: 'POST', + headers: { Authorization: `Bearer ${token}` }, + }) + } finally { + clearSession() + await router.push('/') + } }