# Logout

> `POST /api/user/auth/logout`: User endpoint of the Rone Arena API.

**Sign-in required:** send `Authorization: Bearer <jwt>`. Get the JWT from `POST /api/user/auth/send-vc` then `POST /api/user/auth/login`.

Invalidate the player's session using the JWT obtained from `/api/user/auth/login`. This endpoint terminates the current authenticated session, ensuring that the JWT can no longer be used for authorized requests.

Headers:
- **Authorization**: `Bearer <jwt>` (JWT obtained during login).

The response confirms whether the logout was successful:
- **code**: Status code (0 indicates success).
- **data**: Empty string (no payload returned).
- **msg**: Message string (e.g., 'ok').

Note: Although the login response also includes a `token` field, only the JWT is required for logout. The server uses the JWT to invalidate the session.

## Request

`POST https://arena.rone.dev/api/user/auth/logout`

### Example

```bash
curl -X POST 'https://arena.rone.dev/api/user/auth/logout' \
  -H 'Authorization: Bearer <jwt>'
```

## Example response

```json
{
  "code": 0,
  "data": "",
  "msg": "ok"
}
```

## Links

- Try it in the playground: https://arena.rone.dev/web/user/auth/logout
- User endpoints: https://arena.rone.dev/web/user.md
- OpenAPI schema: https://arena.rone.dev/api/openapi.json
