TypeScript
const options = {method: 'DELETE'}; fetch('http://localhost:8000/v1/auth/session', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "success": true, "data": null, "meta": { "requestId": "<string>", "timestamp": "<string>" } }
Destroy the current session and clear authentication cookies
Logout successful
true
Show child attributes
Was this page helpful?