From: Michael Tremer Date: Fri, 20 Jun 2025 13:17:49 +0000 (+0000) Subject: frontend: Make authentication a composable X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00d8c633f5b8a149afff4ddc4255a645e9682858;p=pbs.git frontend: Make authentication a composable This should allow us to re-use the code better. Signed-off-by: Michael Tremer --- diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 54fb2e57..84d56491 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -2,19 +2,8 @@ import { RouterLink, RouterView } from "vue-router" // Authentication - import { useAuthStore } from '@/stores/auth' - const auth = useAuthStore() - - // Import utils - import { deleteAccessToken } from "@/utils/auth"; - - function logout() { - // Drop all stored authentication data - auth.logout(); - - // Drop the current access token - deleteAccessToken(); - } + import { useAuth } from "@/composables/auth"; + const auth = useAuth();