End every session, on every device
curl --request POST \
--url https://app.trustivan.com/api/v1/auth/logout-all \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/auth/logout-all"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/auth/logout-all', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/auth/logout-all"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}End every session, on every device
Revokes the caller’s entire refresh-token family and writes an
access-token cutoff, so tokens already issued stop working on their
next request rather than living out their TTL. /auth/logout ends only
the session whose refresh token was presented; this ends all of them,
including the caller’s own.
Requires a human session. An API key is refused with 403: a machine
principal has no sessions, and revoking one means deleting the key.
The person can sign straight back in: nothing about their account or membership changes.
POST
/
auth
/
logout-all
End every session, on every device
curl --request POST \
--url https://app.trustivan.com/api/v1/auth/logout-all \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/auth/logout-all"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/auth/logout-all', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/auth/logout-all"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Response
Every session was revoked.