POST
Logout from every session

Overview

Revokes every non-revoked refresh token belonging to the authenticated user — across every device, browser, and session. Use this for “log out everywhere” UX, post-password-change flows, or when a user reports a lost or stolen device. The user id is taken from the sub claim in the access token; clients pass nothing in the body. Already-revoked rows are left alone.

Authentication

Bearer <accessToken> required. Scope: user.

Path parameters

None.

Query parameters

None.

Request body

None.

Response — 204 No Content

Empty body. All sessions for the user are revoked.

Error responses

Example error — 401

Side effects

  • Marks every non-revoked refresh_tokens row for the user with revokedAt = now.
  • All other devices will receive 401 UNAUTHENTICATED on their next /auth/refresh and must log in again.
  • The current device’s access token remains structurally valid until its 15-minute TTL elapses; on next refresh it too will be forced to log in.

See also

curl