Logout
Revokes the submitted refresh token. The refresh token itself is the credential — no Authorization header is required, so a client with an expired access JWT can still log out.
POST
Spree SDK
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Revokes the submitted refresh token. The refresh token itself is the credential — no Authorization header is required, so a client with an expired access JWT can still log out.
import { createClient } from '@spree/sdk'
const client = createClient({
baseUrl: 'https://your-store.com',
publishableKey: '<api-key>',
})
await client.auth.logout({
refresh_token: 'rt_xxx',
})curl --request POST \
--url http://{defaultHost}/api/v3/store/auth/logout \
--header 'Content-Type: application/json' \
--header 'x-spree-api-key: <api-key>' \
--data '
{
"refresh_token": "<string>"
}
'Was this page helpful?
import { createClient } from '@spree/sdk'
const client = createClient({
baseUrl: 'https://your-store.com',
publishableKey: '<api-key>',
})
await client.auth.logout({
refresh_token: 'rt_xxx',
})curl --request POST \
--url http://{defaultHost}/api/v3/store/auth/logout \
--header 'Content-Type: application/json' \
--header 'x-spree-api-key: <api-key>' \
--data '
{
"refresh_token": "<string>"
}
'