Add authentication check and logout functionality in app.vue

This commit is contained in:
Jennie Robinson Faber 2025-08-23 12:47:40 +01:00
parent ee00a8018e
commit 733a1e9f47
9 changed files with 1294 additions and 1653 deletions

View file

@ -0,0 +1,11 @@
export default defineEventHandler(async (event) => {
const token = getCookie(event, 'auth-token')
if (token) {
await useStorage('memory').removeItem(`session:${token}`)
}
deleteCookie(event, 'auth-token')
return { success: true }
})