🔐
View DocsBiometrics
SecurityAuthenticate users with Face ID, Touch ID, or fingerprint
faceidtouchidfingerprintauthenticationsecurity
Demo
Biometric Availability
👆
Checking...
Authenticate
Note: On native platforms, this uses Face ID (iOS), Touch ID (iOS/Mac), or fingerprint (Android). On web browsers, a simulated authentication prompt is shown for testing purposes.
Usage
import { useBiometrics } from '@classic-homes/native/svelte';
// or for React:
import { useBiometrics } from '@classic-homes/native/react';API Reference
| Property | Type | Description |
|---|---|---|
| isAvailable | boolean | null | Whether biometrics are available on device |
| availability | BiometricAvailability | null | Detailed availability info including biometry type |
| isLoading | boolean | Whether an operation is in progress |
| error | Error | null | Current error if any |
| checkAvailability | () => Promise<BiometricAvailability> | Check biometric availability |
| authenticate | (options?) => Promise<BiometricResult> | Prompt for biometric authentication |