`POST /v1/auth/logout`.
POST
/v1/auth/logout
const url = 'https://api.updawg.net/v1/auth/logout';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.updawg.net/v1/auth/logoutExtracting [CurrentUser] is what makes this CSRF-protected: without it a
cross-site page could sign somebody out, which is not a disaster and is
still not something anybody else gets to do.
Responses
Section titled “Responses”Signed out. Clears the session cookie.
No session.
Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}Refused: no CSRF token or not this session’s, or not permitted for this role.
Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}