---
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).

---

[API](https://skmtc.net/pallets-eco/apis/flask-security-external-api.md) · [All operations](https://skmtc.net/pallets-eco/apis/flask-security-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pallets-eco/flask-security-external-api/versions/5ee7c28d6e1e/schema)
