Files
seguidorDeLotes/nuxt4-app/server/routes/auth.logout.get.ts
josedario87 2dbd2222af
All checks were successful
build-and-deploy / build (push) Successful in 30s
build-and-deploy / deploy (push) Successful in 3s
Add flat route files with dot notation
- Add server/routes/auth.authentik.get.ts
- Add server/routes/auth.logout.get.ts
- Test if dot notation creates nested routes /auth/authentik
- Keep auth/ folder as backup
2025-10-11 17:52:38 -06:00

11 lines
240 B
TypeScript

/**
* Logout Handler
* Ruta: /auth/logout
*
* Limpia la sesión del usuario y redirige a la página de inicio
*/
export default defineEventHandler(async (event) => {
await clearUserSession(event)
return sendRedirect(event, '/')
})