Logout and revoke tokens
/v1/auth/logoutRevokes the current session and clears the refresh, pre-auth, and session-marker cookies. Guarded by UserJwtGuard; reads the refresh token from its cookie and accepts a revoke_all flag — when true, every active refresh token for the user is revoked (sign out everywhere) rather than just the current one. Returns the revoked_count.
Request body
application/json
revoke_allboolean Optional Revoke all sessions
Responses
application/json
data *RevokeResponseDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Returned object
curl -X POST "https://auth.canopy-io.com/v1/auth/logout" \ -H "Content-Type: application/json" \ -d '{ "revoke_all": false }'
{ "data": { "revoked_count": 0 } }
Tell us how we can improve this guide.