Logs out the authenticated user. This endpoint currently returns a success response. In a complete implementation, this would invalidate the refresh token.
Authentication
Bearer token (access token) obtained from login.
Response
Success message confirming logout.
Error Responses
401 Unauthorized
Returned when:
- No Authorization header is provided
- Access token is invalid or expired
- Token format is incorrect
Example Request
curl -X POST https://api.tresacontafy.com/api/auth/logout \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
Example Response
{
"message": "Logout exitoso"
}
After logout, the client should discard both the access token and refresh token. Although the refresh token is not currently invalidated on the server side, clients should not attempt to use it after logout.