---
title: "Logout"
method: POST
path: "/api/auth/logout"
tags: ["auth"]
---

# Logout

`POST /api/auth/logout`

## Request

- Base URL: `https://kernelscan.io`
- URL: `https://kernelscan.io/api/auth/logout`
- Auth: none declared

Close the user's active session, invalidate issued tokens, emit an event.

Bumping ``token_version`` makes this a logout-*all*: every access/refresh
token minted before this call (on any device) fails the 'tv' check in
:func:`app.auth.get_optional_user` / the refresh endpoint (backend#288).

## Response `204`

Successful Response

---

[API](https://skmtc.dev/kernelscan/apis/kernelscan-api.md) · [All operations](https://skmtc.dev/kernelscan/apis/kernelscan-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kernelscan/apis/kernelscan-api/revisions/4fa51d41484e?raw)
