---
title: "Log out current user"
method: POST
path: "/logout"
---

# Log out current user

`POST /logout`

If a refresh-token is supplied, it will be revoked as part of logging the user out. If SECURITY_REFRESH_TOKEN_COOKIE_NAME is configured, the refresh token (as well as the cookie) will be deleted as part of logout. If SECURITY_LOGOUT_CSRF is enabled, a valid CSRF token must be provided and an error can be returned if the token is invalid.

## Request body

- Logout
  - `refresh_token` string

## Response `200`

Logout response

- object
  - `meta` object, required
    - `code` integer, required — Http status code

## Other responses

- `302` — Successful logout
- `400` — Errors while validating form (CSRF).

## Changes

> 52 revisions in range; 37 could not be searched.

- **2026-06-14** `5ee7c28d6e1e` — 2 info
  - added the media type `text/html` for the response with the status `200`
  - added the non-success response with the status `400`
- **2019-07-23** `11c8459a5c04` — 2 breaking, 2 info
  - removed the request body
  - removed the media type `text/html` for the response with the status `200`
  - removed the non-success response with the status `302`
  - removed the non-success response with the status `400`

[Change history](https://skmtc.dev/pallets-eco/apis/flask-security-external-api/changes/logout/post.md)

---

[API](https://skmtc.dev/pallets-eco/apis/flask-security-external-api.md) · [All operations](https://skmtc.dev/pallets-eco/apis/flask-security-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pallets-eco/flask-security-external-api/revisions/ee92f388dafa/schema)
