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
Labels:
bug,ios,passkeyPriority: Medium
Estimated Time: 1 hour
Description:
AuthStore.register()callsPasskeyService.shared.register(username:), which itself alreadycalls
APIClient.shared.registerPasskey(...)— i.e., the backend registration completes — andonly afterward does
AuthStorecallKeychainService.shared.saveCredentialID(credID). If the appis killed between those two lines, the backend has a registered passkey but the device has no
local record of the credential ID, silently breaking
ICloudSyncServiceassociations later.Tasks:
saveCredentialIDintoPasskeyService.register()itself, immediately after the backend call succeeds