Authentication
Sign Out
Signs out the current user from this device only. Removes the FCM token if provided and clears the session cookie. Other devices remain logged in until their sessions expire naturally.
Sign Out
Documentation Index
Fetch the complete documentation index at: https://docs.traza.com.au/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Signs out the current user from this device only. This endpoint handles device-specific logout by:- Removing the FCM token for push notifications (if
deviceIdis provided) - Clearing the session cookie
Request Body
The request body is optional. If you want to remove the FCM token as part of sign-out, include thedeviceId:
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
deviceId | string | No | The FCM device ID to remove. If provided, the push notification token for this device will be removed from the user’s profile. |
Behavior
Single-Device Sign-Out
- Only signs out the current device
- Other devices remain logged in
- Sessions on other devices expire naturally based on their TTL
FCM Token Removal
- If
deviceIdis provided, the corresponding FCM token is removed - User will no longer receive push notifications on this device
- Other devices still receive notifications
Error Handling
- Always returns 200 - sign-out never fails
- If FCM token removal fails, it logs the error but still clears the session
- If the session is already invalid, it still clears the cookie
Example Usage
Client-Side (with FCM token removal)
Notes
This endpoint uses single-device sign-out. To sign out from all devices, you
would need to implement a separate endpoint that revokes all refresh tokens
using
auth.revokeRefreshTokens().Body
application/json
Optional FCM device ID to remove push notification registration for this device
Example:
"550e8400-e29b-41d4-a716-446655440000"
Response
User signed out successfully (always returns 200, even if FCM removal fails or session was invalid)
Sign Out