Sign out.
DELETE
/v1/sessions/current
const url = 'https://example.com/api/auth/v1/sessions/current';const options = {method: 'DELETE', headers: {cookie: 'refresh_token=<refresh_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/api/auth/v1/sessions/current \ --cookie refresh_token=<refresh_token>Ends the session the refresh_token cookie belongs to, if any, and clears both cookies.
Authorizations
Section titled “Authorizations”- refreshCookie
- None
Responses
Section titled “Responses”Signed out.
Headers
Section titled “Headers”Set-Cookie
string
Access_token (HttpOnly; Secure; SameSite=Lax; Path=/; Max-Age=900) and refresh_token (HttpOnly; Secure; SameSite=Strict; Path=REFRESH_COOKIE_PATH; Max-Age=2592000), or both cleared.
The token lacks a scope or isn’t the right kind, or the request came from another origin.
Media typeapplication/problem+json
An RFC 9457 problem.
object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
errors
object
key
additional properties
string
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}The service failed; the problem says nothing more.
Media typeapplication/problem+json
An RFC 9457 problem.
object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
errors
object
key
additional properties
string
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}