Logout - MarcoLagalla/marette_backend GitHub Wiki
Name | Users Logout |
---|---|
Description | Performs logout and destroys Auth Token |
URL | api/v1/account/logout |
Allowed methods | POST |
Authorizations | IsAuthenticated |
POST
Performs logout providing an authentication token. Destroys the stored authentication token, this action has to be performed also by the client, deleting the auth_token cookie.
Field | Type | Required | Unique |
---|---|---|---|
Authorization |
Header str | yes | yes |
And returns --> HTTP_200_OK
{
"logout": "user successfully logged out"
}
Or, in case token is not provided (user not logged in) --> HTTP_204_NO_CONTENT
{
"detail": "Authentication credentials were not provided."
}