Logout (current session)
Auth
Logout (current session)
Revoke the current session’s refresh token.
POST
Logout (current session)
Overview
Revokes the refresh token associated with the caller’s current session, without affecting any other devices the same user may be logged in on. The session id is taken from thesid claim in the access token — clients do not pass anything in the body.
After this call, any subsequent /auth/refresh using a refresh token from this session returns 401 UNAUTHENTICATED. The access token itself remains structurally valid until its 15-minute TTL elapses (we do not maintain a JWT blacklist), but on its next refresh the client will be forced to log in again.
Authentication
Bearer <accessToken> required. Scope: user.
Path parameters
None.Query parameters
None.Request body
None. The session to revoke is identified by the access token’ssid claim.
Response — 204 No Content
Empty body. The session is revoked.Error responses
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHENTICATED | Missing, malformed, or expired access token. |
Example error — 401
Side effects
- Marks all
refresh_tokensrows for the caller’ssessionIdwithrevokedAt = now. - Other sessions for the same user are untouched.
See also
- Logout from every session — revoke every refresh token for the user.
- Refresh tokens — token rotation.
- Authentication — full token lifecycle.