Skip to main content

Use the reviewed authentication contract

Driver App authentication combines configured credential branches, server authentication, a Driver-role gate, and local session persistence. Treat those as separate decisions: a successful credential response is not automatically a valid Driver session, and locally restored session state is not fresh server authorization.

This is a source-defined public responsibility contract. It does not certify the running authentication service, a provider, or runtime success.

Availability

The reviewed Login screen enables email and cellphone password presentation and passes the Driver role as its allowed standard-login role. Project configuration can also expose OTP, device-code, provider-specific, CAPTCHA, or other alternate branches. Alternate branches do not uniformly repeat the same Driver-role gate and must not be called equivalent without separate acceptance.

The reviewed signed-out navigation registers Home, Login, and Forgot. It does not register Driver signup, and it has no reviewed inbound deep-link mapping.

Prerequisites

  • A configured Driver App build and supported Driver account workflow.
  • Current authentication configuration for the intended branch.
  • Explicit Driver-role enforcement on every branch that can create local session state.
  • Secure handling of credentials, OTP values, provider results, tokens, notification identity, and locally stored account data.
  • Separate server authorization on every request after authentication.

Responsibility boundaries

BoundaryResponsibilityLimit
Login UIPresent configured credential/OTP/provider controls and local validation/loading/error states.Visibility does not prove provider or server availability.
Authentication controllerBuild the selected credential shape, call the matching source contract, and interpret the response.Branches can differ in role checks and cleanup.
Driver role gateAdmit only the reviewed Driver role into the standard local-session path.Not uniformly established for alternate branches.
Rejected-role cleanupRequest server logout for a returned non-Driver session before showing permission error.Logout/cleanup can fail or partially settle.
Session providerSave/remove local token, user and optional device state; expose auth/loading.Local storage is not server validation or revocation.
Root navigationSelect signed-out or authenticated branch from local session/readiness state.Navigation is not authorization for a task.
APIAuthenticate credentials and authorize every subsequent read/mutation.Running artifact relation remains unconfirmed.
OTP/CAPTCHA/providerOwn generation, verification, challenges and external results.Provider completion does not prove Driver role.

Inputs and result

Input/branchClient resultRequired checkFailure/partial boundary
Email/cellphone + passwordStandard authentication responseDriver role before local loginError, wrong role, cleanup failure, missing session
OTPGenerated/verified one-time credential resultRepeat Driver-role and session policySome verification paths can set local session without the standard role block
Device codeDevice-code credential and optional local persistenceDriver role, device ownership and revocationUI exposure differs from controller capability
Provider-specific loginProvider/server resultDriver role and provider identityAvailability and role parity unproven
CAPTCHAChallenge value added before selected requestChallenge validity and provider resultMissing/incomplete config can block or distort another branch
Notification identityOptional token/app data included during authenticationNotification ownership and privacyLogin success does not prove push registration/delivery
Local session restoreStored token/user/device returned to providersReauthorize each API requestStale/disabled/wrong-role state can persist until later checks
Forgot flowLocal form can show a link-sent state before request settlementObserve final success/error separatelyUI transition is not delivery or reset completion

Security and privacy

  • Never log or expose credentials, OTP, CAPTCHA values, tokens, provider IDs, notification identity, account records, or device codes.
  • Apply the Driver-role gate before every branch writes local session state.
  • Treat rejected-role logout, provider cleanup, token revocation and local cleanup as separate results.
  • Do not inject tokens, navigate directly to authenticated routes, or use saved state as authorization evidence.
  • Clear prior-account and late-request state before admitting another account.

Limits and failure states

StateMeaningMaintainer response
Configured branch hiddenUI/config does not admit it.Do not expose controller-only capability.
Authentication errorSelected server/provider contract returned or threw failure.Keep session signed out and surface sanitized error.
Wrong roleStandard branch rejected returned account.Require complete server/local cleanup; no authenticated navigation.
Alternate branch success-lookingProvider/OTP returned an account/session.Verify Driver-role parity before local login.
Local session restoredSaved data became available.Reauthorize every read/action; do not call it fresh.
Disabled/missing local userSession consistency check can request local logout.Server state and cleanup remain separate.
Forgot link-sent stateLocal recovery UI advanced.Await actual request/result; no email-delivery claim.

Troubleshooting

SymptomInspectSafe diagnostic
Expected sign-in option is missingCurrent configuration and UI exposureDo not invoke a controller-only branch.
Non-Driver account appears acceptedBranch-specific role enforcement and local session writeStop authenticated work and follow secure cleanup/escalation.
Wrong-role error appears but state is unclearServer logout, local session and navigation results separatelyDo not reuse returned tokens or force navigation.
App opens authenticated from saved stateSession hydration and per-request authorizationTreat stored state as provisional until current requests authorize.
Recovery says link sent too earlyLocal transition versus request settlementWait for final error/success; do not repeat or claim delivery.

Re-review this contract whenever a login branch, role gate, CAPTCHA/provider, notification identity, session storage, rejected-role cleanup, recovery state or Root auth selection changes.

Related guides: Open Driver App and reach sign in · Sign in as a driver · Sign-in options · Reset a password · Authenticated bootstrap