End the user session
curl --request POST \
--url https://api.example.com/api/auth/logout{
"success": true,
"message": "<string>",
"data": null
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/David9604/BackMaqagr/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer <your_jwt_token>
curl -X POST "http://localhost:4000/api/auth/logout" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json"
{
"success": true,
"message": "Sesión cerrada exitosamente",
"data": null
}
{
"success": false,
"message": "Token no proporcionado o inválido"
}
| Status Code | Description |
|---|---|
| 401 | Missing or invalid token |
| 500 | Internal server error |
Client-Side Token Management
Automatic Logout
src/routes/auth.routes.js:208src/controllers/authController.js:logoutcurl --request POST \
--url https://api.example.com/api/auth/logout{
"success": true,
"message": "<string>",
"data": null
}