Biometric login
Prompt for Face ID, Touch ID, or fingerprint and read the result.
Prompt for biometric auth
Gate a sensitive action behind Face ID, Touch ID, or fingerprint. Use it before revealing a recovery phrase, confirming a payment, or unlocking a screen. Pass options your native build expects (e.g. a reason string).
Check getDeviceInfo()?.biometricsAvailable before prompting, and fall back to PIN/password when it's false.
Awaiting the call only confirms the prompt was requested. The actual success or failure arrives on the biometricResult event.
Read the result
Subscribe to biometricResult to learn whether auth succeeded. The BiometricResult payload has status ("success" or "failed"), data (the raw native auth result), and platform ("ios" | "android"). bdk.on(...) returns an unsubscribe function — call it when you're done.
A failed or cancelled prompt comes through biometricResult, not the error event, and does not reject the promise. Branch on status inside your listener.
Subscribe before you prompt
Register the biometricResult listener before calling authenticateBiometrics(), or a fast result can be missed.