You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
471 B

// server/api/auth/logout.post.ts
/**
* POST /api/auth/logout
*
* End user session and clear session cookie
*
* Response:
* {
* "success": true
* }
*/
export default defineEventHandler(async (event) => {
// Clear session (nuxt-auth-utils)
await clearUserSession(event)
// Optional: Revoke Cidaas tokens (Single Sign-Out)
// This would require storing refresh_token in session and calling Cidaas revoke endpoint
return {
success: true,
}
})