Business · Product · Technology · AI

Manage sign-in identifiers while preserving a remaining method

A Movo-X account-management case tracing selected identifier lists, remaining-method rules, trusted-session choices, proof request bodies and returned refusal states.

Work directly with Omer Muneer Qazi · Reviewed 29 November 2026

The scenario: account access must survive a method change

A patient may sign in with email, later add a phone and eventually remove an old provider identity. The management screen needs to distinguish identifiers already attached to the account from methods currently offered for addition. It must also explain why a method cannot be removed or why a fresh proof is required.

Nineteen selected Android JVM cases and six portable Swift cases passed for Movo-X identifier models and request contracts. Android wire fixtures use a local mock HTTP server; Swift fixtures use an injected fake transport. No real account was changed. These cases make selected client decisions reviewable while the authoritative service retains responsibility for actual account ownership and mutation.

Decode the account snapshot without turning it into an access grant

The selected fixtures decode multiple identifier kinds, passkey entries, phone-verification state, recent sign-in information and clinic-linking requirements. The Swift fixture also contains a malformed recent-sign-in element and checks that the valid element remains. That is a selected compatibility outcome, not a claim that every malformed response is harmless.

The lists describe a returned snapshot. A displayed trusted-session value or verified-phone flag does not independently authorize a change or access to clinical records. Current server checks, snapshot freshness and session transition handling need their own acceptance. Recent sign-in rows also should not be described as an exhaustive security audit trail based on one decoded fixture.

Keep presentation rows separate from the count of remaining methods

The selected row cases order phone, email and provider identifiers while excluding passkeys from the ordinary identifier rows. Passkeys have separate management. The inspected rules still count recognized sign-in methods when deciding whether another method would remain after removal.

That distinction prevents the screen layout from becoming the account-access model. A method hidden from one list can still matter to removal policy. The cases cover selected known kinds and counts, not every future or malformed identifier. Review new kinds and migration compatibility explicitly before treating a client count as a complete representation of usable account access.

Require both local eligibility and the returned removable flag

Both native fixtures refuse local removal of the only method even when that synthetic entry is marked removable. They also refuse selected entries for which the returned removable flag is false, while allowing a selected removable entry when another method remains. This is a useful defensive presentation rule.

The rule is still local and can be bypassed by an independent client. Two devices could also act on different snapshots. The authoritative mutation needs its own current-account, concurrency and remaining-method enforcement. The fake Swift refusal fixture returns a last-method conflict; receiving and classifying that answer does not execute the server transaction that should enforce it.

Distinguish first-phone setup from adding another identity

The selected add-rule cases allow a first phone in a supplied untrusted, phoneless state, while refusing an extra email in that untrusted state. They refuse a duplicate Google identifier and compare selected email duplicates case-insensitively. The Swift rules additionally cover an Apple add choice in their selected fixture.

These are client eligibility rules, not proof that the phone or mailbox belongs to the patient. The add operation still carries a proof to the service. Actual proof validation, identifier ownership, limits and account linking require authoritative acceptance. Keep platform-specific provider choices explicit rather than claiming identical menus merely because the two rule helpers have similar names.

Keep passkey limits and fresh-proof windows independent

An Android case checks the selected ten-passkey threshold and that an untrusted session cannot add a passkey. Another evaluates a supplied reauthentication deadline at selected times and checks a missing deadline. These are local limit and time predicates, not an actual authenticator registration or a proof of server-clock agreement.

The selected wire fixture requests passkey options for proof, then sends a synthetic credential object to reauthenticate. A separate registration fixture checks a trimmed device name. Neither creates a real passkey or verifies an authenticator assertion. Installed platform APIs, current relying-party configuration, challenge binding and authoritative expiry remain independently necessary.

Construct an explicit proof and operation identity

The Android proof cases check selected phone, email, Google and passkey JSON shapes, including selected code normalization and refusal of incomplete or invalid codes. The add and remove request fixtures check methods, paths and supplied request identities. Swift also checks the selected nested phone-proof body and mutation identity on add.

Those assertions make request construction concrete. A stable header is not evidence that a database stores and replays the operation exactly once. The fake Swift add answer includes alreadyAdded and the client decodes it; that does not exercise durable deduplication. An isolated current service should separately accept repeated operations, uncertain answers and conflict semantics.

Interpret refusal reasons without silently declaring a change complete

Selected Android cases classify wrong-code, identifier conflict, last-method, phone-in-use, reauthentication, untrusted-session, rate-limit and unavailable outcomes. Swift fixtures check last-method and phone-in-use responses plus refusal of an invalid identifier path before a successful operation. These are selected error-to-presentation contracts.

A human-readable notice should preserve the reason the service actually returned. It should not imply that the identifier was removed or that a rejected proof is a new session. Current response variants, language, accessibility and installed recovery flows still need acceptance. The selected cases do not prove that every backend error is classified or that every user can recover automatically.

Retry a proof-gated change only within its defined request contract

The Swift fixture makes a selected removal return a reauthentication-required response first, then permits the requirement handler and checks that the removal is attempted twice. It does not authenticate a real user in that handler. The existing request-gating chapter separately examines bounded replay and prompt behaviour.

Treat this removal fixture as evidence that the selected client path retries after the handler accepts. It is not a global retry policy or proof of durable mutation identity on every route. Verify cancellation, declined proof, changed snapshots and uncertain server outcomes with the actual operation contract. Keep removal success tied to a returned authoritative result.

An identifier-management engineering handover

Retain the twenty-five scoped cases, selected list shapes, local eligibility decisions and inspected request details. Add isolated server transactions for concurrent removals, repeated additions, identifier conflicts and proof expiry. Use controlled identities for real provider/passkey acceptance and verify the installed management screens with accessibility and language checks.

For a CTO, the responsibility chain is explicit: the service returns the account snapshot; local rules offer a defensible set of actions; the client submits the selected proof and operation; the service enforces ownership and remaining access; the screen reconciles the returned list or refusal. The selected evidence supports client behaviour without claiming a completed account-security or device audit.

Compare the reviewed boundaries

A management rule is separate from authoritative account mutation

On smaller screens, scroll across to compare every column. Keyboard users can focus the table and use the arrow keys.

BoundarySelected evidenceSeparate acceptance
Returned snapshotSynthetic list, rows and selected compatibility casesCurrent account/session and snapshot freshness
Remaining methodsSelected count and removable-flag decisionsConcurrent server mutation and usable access
Addition/proofSelected eligibility, bodies and request identitiesOwnership, real provider/passkey and durable replay
ReconciliationFake conflict reasons and proof-gated removal retryInstalled UI, cancellation and authoritative returned state

Illustrative control flow

Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.

snapshot = load_account_identifiers()
actions = derive_local_choices(snapshot, current_offers)
proof = obtain_the_selected_authoritative_proof()
updated = submit_identifier_change(proof, operation_identity)
reconcile_from_returned_list_or_refusal(updated)
# Local counts and removable flags do not replace current server ownership/concurrency checks.

About this engineering series

Written by Omer Muneer Qazi from a review of Movo-X implementation and dated engineering records. This article explains source behaviour and historical observations; current production, clinical outcomes and store availability require their own verification. Examples are synthetic and proposed test cases are identified as such.

Explore the Movo-X engineering series → · Related implementation experience →

Discuss a similar engineering problem

Send the workflow, current platform and the decision your team needs to make. I can help define an implementation or review scope with concrete acceptance evidence.

Discuss your project on WhatsApp ↗
WhatsApp Omer about this project ↗