NativeAccountCoordinator.mjs
Source file: apps/mobile/src/services/NativeAccountCoordinator.mjs
Module: app-mobile
Size: 79 lines
SHA-256: de66be1031709d127877159cb0ca9991258470129d096b38af0123ef25f54615
Responsibility
Runs the real customer UI with native or fail-closed device and backend services; no simulated success.
Declared entry points
nonEmpty— source line 9.unavailableVault— source line 13.fail— source line 14.createNativeAccountCoordinator— source line 17.client— source line 19.address— source line 23.reply— source line 29.reply— source line 38.me— source line 48.value— source line 59.result— source line 60.
Imports and dependencies
- Line 7:
import {HslgAccountOrderClient} from './HslgAccountOrderClient.mjs';
Behaviour and audit locations
- Line 2:
* HSLG mobile-only account orchestration. Never bundles demo credentials or
Account UI orchestration
createNativeAccountCoordinator() maps existing shared account modes (signup, verify, recover, reset, signin) to the production HTTPS client. Anonymous flows can execute without a credential vault, but sign-in rejects missing secure storage. Profile update currently accepts a display name and refuses email/phone edits because those are not supported by the API. On login failure after token save, it attempts to log out rather than leave a partially authenticated state. Uncertain server logout is represented separately from a successful local credential clear.
Relationship to the system
This page is the file-level source reference, not the architecture rationale. Read the module explanation, the corresponding architecture decision and user guide before changing behaviour. Names and line locations above are extracted from this exact source version; they are reference points, not proof that an external service or a phone feature works.
Change verification
Review the entry points and errors in this file, then run the module’s associated tests, source dependency gate, history gate and documentation coverage check. If the file changes an API response, user interaction, data model, deployment or third-party dependency, revise those human explanations and disaster recovery/licensing when relevant. Do not infer actual native or external API operation from source presence.