curl -X POST 'https://api.weir.ai/auth/logout' \
-H 'Content-Type: application/json' \
-d '{
"refreshToken": "admin_refresh_123456789"
}'
{
"message": "Logout successful",
"status": "success"
}
Logout admin user and invalidate tokens
curl -X POST 'https://api.weir.ai/auth/logout' \
-H 'Content-Type: application/json' \
-d '{
"refreshToken": "admin_refresh_123456789"
}'
{
"message": "Logout successful",
"status": "success"
}
curl -X POST 'https://api.weir.ai/auth/logout' \
-H 'Content-Type: application/json' \
-d '{
"refreshToken": "admin_refresh_123456789"
}'
{
"message": "Logout successful",
"status": "success"
}
const adminLogout = async (refreshToken) => {
const response = await fetch('https://api.weir.ai/auth/logout', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ refreshToken })
});
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
return await response.json();
};
Was this page helpful?