Skip to content

Make Passkey Registration Atomic With Credential-ID Persistence #4

Description

@maugauwi-hash

Labels: bug, ios, passkey
Priority: Medium
Estimated Time: 1 hour

Description:
AuthStore.register() calls PasskeyService.shared.register(username:), which itself already
calls APIClient.shared.registerPasskey(...) — i.e., the backend registration completes — and
only afterward does AuthStore call KeychainService.shared.saveCredentialID(credID). If the app
is killed between those two lines, the backend has a registered passkey but the device has no
local record of the credential ID, silently breaking ICloudSyncService associations later.

Tasks:

  • Move saveCredentialID into PasskeyService.register() itself, immediately after the backend call succeeds
  • Add a crash-safety test (simulate termination between backend success and local persistence)
  • Document the invariant that credential ID persistence must never trail the backend call

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions