Labels: bug, ios, passkey, security, critical
Priority: High
Estimated Time: 3 hours
Description:
PasskeyService.register() (ios/EthosProtocol/Sources/Services/PasskeyService.swift:24) sets
pubKey = reg.rawAttestationObject?.base64URLEncodedString() and sends it to
APIClient.registerPasskey(publicKey:) under the public_key field. This is the entire CBOR
attestation object, not an extracted public key. docs/mobile-passkey-flow.md (lines 148-159)
describes a materially different flow: extract credential.credentialPublicKey (DER) separately
from the attestation object and send both. The client and its own documentation disagree, and
whichever the backend actually expects, one side of this is wrong.
Tasks:
- Determine what the backend's
/auth/register endpoint actually parses today
- Extract the COSE/DER public key from the attestation object client-side, or confirm the backend parses attestation objects and update the docs instead
- Rename the wire field so it isn't called
public_key if it's actually the attestation object
- Add a regression test asserting the exact bytes sent match the documented contract
Labels:
bug,ios,passkey,security,criticalPriority: High
Estimated Time: 3 hours
Description:
PasskeyService.register()(ios/EthosProtocol/Sources/Services/PasskeyService.swift:24) setspubKey = reg.rawAttestationObject?.base64URLEncodedString()and sends it toAPIClient.registerPasskey(publicKey:)under thepublic_keyfield. This is the entire CBORattestation object, not an extracted public key.
docs/mobile-passkey-flow.md(lines 148-159)describes a materially different flow: extract
credential.credentialPublicKey(DER) separatelyfrom the attestation object and send both. The client and its own documentation disagree, and
whichever the backend actually expects, one side of this is wrong.
Tasks:
/auth/registerendpoint actually parses todaypublic_keyif it's actually the attestation object