feat: Added logout function

This commit is contained in:
2023-06-26 15:16:24 +02:00
parent bbd329a4cf
commit 7678a44945
3 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
export default defineEventHandler((event) => {
setCookie(event, 'jwt', '', { httpOnly: true, maxAge: 1 })
sendRedirect(event, '/', 302)
})