Log Out
Use the Log out confirmation screen to end the current session in the Air Doctor app.
The confirmation screen appears after the user selects Log out from the app menu.
This screen includes:
- A confirmation prompt: Are you sure you want to logout?.
- Cancel button that dismisses the prompt.
- Ok button that confirms logout.
Workflow
This sequence describes how the user ends a session through the log out flow.
- From the main menu, select View account.
- Select Log out.
- Review the confirmation prompt.
- Select Ok to end the active session.
At Levels 1–2, Air Doctor controls the entire sequence.
At Levels 3–6, the host app may wrap or replace parts of this flow while the SDK or API still ends the session.
Validations
These rules control when log out can occur and how the app presents the confirmation.
| Scenario | App Behavior | SDK Output |
|---|---|---|
| No active authenticated session exists. | Ignores the log out action or redirects to the Log in screen. | Returns an unauthenticated state. |
| User selects Log out from the menu. | Displays the confirmation prompt. | Returns a state that indicates pending confirmation. |
The SDK requires an authenticated session before it ends the session token.
Actions
Log out behavior and session control depend on the integration level.
Session Termination
| Scenario | App Behavior | SDK Output | Integration Level Impact |
|---|---|---|---|
| User confirms log out on the confirmation screen. | Ends the authenticated session and clears the current token. | Returns a state that indicates the user is logged out. | Levels 1–2: Air Doctor controls the prompt and ends the session. Levels 3–4: Air Doctor module presents the prompt; host app shell controls placement. Levels 5–6: Host app triggers /account/logout or SDK log out and controls presentation. |
| User selects Cancel on the confirmation screen. | Closes the dialog and keeps the current session active. | Returns a state that indicates the session remains active. | Levels 1–4: Air Doctor or Air Doctor module controls the dialog. Levels 5–6: Host app controls the confirmation UI. |
Endpoint Resources
Logout Confirmation
PUT
/account/logout
Use this endpoint to retrieve configuration for log out confirmation and to align UI behavior with the current session state at Levels 3–6.
Logout
POST
/account/logout
Use this endpoint to end the authenticated doctor’s session and revoke access tokens.
Calls to this endpoint protect session integrity and help prevent unauthorized reuse of credentials.
| Level | Reference | Type | Description | Placement |
|---|---|---|---|---|
| 1 | logout | Link | Logs out the user. | Account screen navigation. |