Move auth routes to server/api/auth/
BREAKING CHANGE: Auth routes moved from /auth/* to /api/auth/* - Move server/routes/auth/ to server/api/auth/ - Update login.vue to use /api/auth/authentik - Update UserMenu.vue to use /api/auth/logout - Remove old server/routes/ structure - server/api/ is better supported in Nuxt 4 IMPORTANT: Update these in Gitea: - Variable NUXT_OAUTH_AUTHENTIK_REDIRECT_URL to: https://seguidordelotes.nucleoriofrio.com/api/auth/authentik - Update Authentik redirect URI to: https://seguidordelotes.nucleoriofrio.com/api/auth/authentik
This commit is contained in:
10
nuxt4-app/server/api/auth/logout.get.ts
Normal file
10
nuxt4-app/server/api/auth/logout.get.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Logout Handler
|
||||
* Ruta: /api/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, '/')
|
||||
})
|
||||
Reference in New Issue
Block a user