Polarcraft/webv2/server/api/auth/index.delete.ts

5 lines
143 B
TypeScript

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