Revokes the refresh token, effectively logging the customer out.
JavaScript
import { createClient } from '@spree/sdk' const client = createClient({ baseUrl: 'https://your-store.com', publishableKey: '<api-key>', }) await client.auth.logout({ refresh_token: 'rt_xxx', })
Publishable API key for store access
JWT token for authenticated customers
Refresh token to revoke
logout without refresh token (no-op)
Was this page helpful?