From 470efe69564a9f2480c3b7659e57cb019315cf91 Mon Sep 17 00:00:00 2001 From: Flycro Date: Fri, 10 Nov 2023 15:51:08 +0100 Subject: [PATCH] fix(CSRF): Remove Cookie on Logout --- composables/useAuth.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composables/useAuth.ts b/composables/useAuth.ts index 9e649aa..587e12c 100644 --- a/composables/useAuth.ts +++ b/composables/useAuth.ts @@ -76,6 +76,9 @@ export function useAuth() { await $larafetch('/logout', { method: 'post' }) user.value = null + const csrf_cookie = useCookie('XSRF-TOKEN') + csrf_cookie.value = null + await router.push('/login') }