WebAuthnPlatformAdapter
Component Detail
Description
Abstracts platform-specific WebAuthn and FIDO2 APIs behind a single interface. On web it delegates to the browser's navigator.credentials API; on iOS it uses ASAuthorizationController; on Android it uses the FIDO2 API. Detects platform capability and surfaces a uniform availability flag.
webauthn-platform-adapter
Sources & reasoning
Passkeys are not explicitly mentioned in the source documentation. The feature is required by the authoritative blueprint which assigns it to Authentication & Access Control at v1.1. Target release v1.1 follows the blueprint's phase assignment; no earlier phase evidence exists in the source doc, and the feature is clearly post-BankID/Vipps (Fase 2) in any logical delivery sequence.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Detect WebAuthn/FIDO2 availability on current platform and OS version
- Invoke platform create-credential flow with encoded options
- Invoke platform get-credential flow with encoded challenge
- Encode/decode CBOR and base64url for cross-platform compatibility
- Translate platform-specific errors to shared WebAuthnError enum
Interfaces
isSupported(): boolean
createCredential(options: EncodedCreationOptions): Promise<EncodedAttestation>
getCredential(options: EncodedRequestOptions): Promise<EncodedAssertion>