Logout
POST
/auth/logout
const url = 'https://example.com/auth/logout?full=false';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://example.com/auth/logout?full=false'Clear auth cookies and revoke token (SEC-57: POST to prevent CSRF via GET).
Optional RP-initiated logout via ?full=true. POST only: a state-changing GET could be triggered cross-site (image tag, link) to sign a user out.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”full
Full
boolean
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Example generated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}