Apple Web Authn Provider
Apple-native WebAuthn provider using AuthenticationServices framework.
This provider implements WebAuthn passkey operations for iOS 16+ and macOS 13+ using Apple's ASAuthorizationPlatformPublicKeyCredentialProvider. It provides biometric-secured credential creation and assertion for Stellar smart account operations.
The provider handles:
Passkey creation with platform authenticator (Touch ID / Face ID)
Passkey assertion for transaction signing
Automatic public key extraction from attestation data
Proper bridging of delegate callbacks to Kotlin coroutines
Usage:
val provider = AppleWebAuthnProvider(
rpId = "example.com",
rpName = "My Stellar Wallet"
)
val config = OZSmartAccountConfig.builder(...)
.webauthnProvider(provider)
.build()Note on macOS: ASAuthorizationController requires a presentation context provider (ASAuthorizationControllerPresentationContextProviding) to specify the window in which to present the authorization sheet. On iOS this is handled automatically. On macOS, callers should set the presentationContextProvider on the controller via a platform-specific integration point (e.g., a SwiftUI bridge or AppKit delegate). A future API revision may accept an optional presentation context parameter.
Properties
Optional presentation context provider for the authorization controller.
Functions
Authenticates with an existing WebAuthn credential (passkey assertion) using Apple's AuthenticationServices framework.