Sign out
Driver App shows a logout control in Profile. Selecting it can start an active-order check, a server logout request, notification-token cleanup, local session cleanup, order-state reset, and broader storage cleanup.
This source-only procedure stops before logout is selected. It does not sign out a real Driver, change availability, remove a push token, close a socket, clear storage, or prove that server and device cleanup completed.
Availability
The control is visible in the authenticated Profile actions. The Driver path checks for one returned active/assigned order before requesting logout. A matching order or a handled read error can block the flow with an error state.
Visibility of logout does not mean the account is eligible to sign out. The client guard, API guard, current order state, session strategy, notification state, local storage and follow-on effects are separate.
Before you start
- Open Profile and locate logout.
- Confirm that you are not using documentation or testing to change a real session.
- Do not accept, reject, update, or complete an order to make logout available.
- Do not clear app data, delete sessions, remove notification permissions, or disable connectivity as a workaround.
- Leave logout untouched in this source-only guide.
An apparently empty order list is not proof that the active-order guard or server will allow logout.
Complete the task
The admitted task is a pre-action review:
- Verify that the authenticated Profile screen is visible.
- Identify the logout row and icon.
- Review the states below so you understand what can happen after a real press.
- Do not select the control.
If selected outside this guide, the client disables repeated presses while it works, reads stored notification state, checks active orders, and then may send a logout request with notification information. Only after the server response reports no error does the default flow request local session and order-state reset; the Profile wrapper then starts broader storage cleanup.
Verify the result
The only accepted result is recognition of the pre-action boundary:
- logout is visible in Profile; and
- no active-order read, logout request, notification/token change, local session reset, storage clear, availability change, log/job/socket effect, or navigation change was initiated.
Do not verify this guide by expecting a signed-out screen or by inspecting real tokens, sessions, storage, orders, notification state, sockets, or availability.
States and variations
| Possible state after a real press | Meaning | What remains unproven |
|---|---|---|
| Loading/disabled control | Client guard or logout flow is in progress. | Which step is active or whether it will settle |
| Active-order guard error | Guard read failed or current result could not be used. | That logout did not continue on every failure path |
| Assigned-order message | Client guard found a matching active order. | Complete server order truth or which action resolves it |
| Server logout error | API reported an error or request failed. | Token/availability/provider state and partial server effects |
| Server logout success result | API primary response had no error. | All push, availability, log, job, socket, session and provider cleanup |
| Local session reset | Stored user/token and related local session values are requested for removal. | Durable storage completion or server invalidation |
| Broader storage cleanup | App requests removal while preserving tutorial and language values. | Completion timing; the multi-key removal is not awaited in reviewed helper |
| Signed-out navigation visible | Root reacted to local auth state. | Server cleanup, remote session closure, push-token removal, or absence of late effects |
The client active-order guard catches its own read error but can return no response to the caller; that caller can continue to the logout request. Do not assume every guard-read failure blocks logout.
Troubleshooting
| What you see | What to check | Safe recovery |
|---|---|---|
| Can't logout, You have assigned orders | Current active delivery/assignment state and the order owner | Do not mutate an order solely to sign out. Ask the dispatcher/order owner for the supported next step. |
| A guard/read error appears | Connectivity, session and current order-read state | Do not press again. The failure path can be ambiguous; escalate with sanitized time/error class only. |
| logout remains disabled/loading | Guard, API request, or client state has not settled. | Do not kill storage or repeat the press; report the visible state. |
| Error appears after logout request | Server or client reported a failure. | Treat the session as indeterminate and avoid order/session actions until the account owner verifies it. |
| Signed-out screen appears but notifications or session state seem active | Navigation can react before every local/server/provider cleanup is verified. | Do not inspect or share tokens. Ask the session/notification owner to reconcile current state. |
| Profile remains visible after a reported success | Local session/order/storage/root transitions may have partially settled. | Do not repeat logout or clear app data. Escalate. |
| You need to remove another device session | Logout is not the sessions-management flow. | Use Manage sessions. |
Related guides: View the Driver profile · Active delivery · Manage sessions · Delete account