API Reference
Complete reference for every function exported by @sbaiahmed1/react-native-biometrics, grouped by area.
Configuration
| Function | Description |
|---|---|
configureKeyAlias() | Configure a custom key alias for biometric key storage |
getDefaultKeyAlias() | Get the current default key alias |
configure() | Configure the library with a configuration object |
Core Functions
| Function | Description |
|---|---|
isSensorAvailable() | Check if biometric authentication is available |
simplePrompt() | Basic biometric authentication with a custom message |
authenticateWithOptions() | Enhanced authentication with customizable options |
Key Management
| Function | Description |
|---|---|
createKeys() | Generate cryptographic keys for biometric operations |
createKeysWithOptions() | Options-object variant, including prompt-free keys |
keyExists() | Check whether a key exists without prompting |
getPublicKey() | Retrieve the public key without prompting |
sign() | Sign data without any authentication prompt |
deleteKeys() | Delete previously created keys |
getAllKeys() | Retrieve all stored keys |
Device Security
| Function | Description |
|---|---|
getDeviceIntegrityStatus() | Detect rooted/jailbroken devices and runtime hooks |
Debugging & Diagnostics
| Function | Description |
|---|---|
getDiagnosticInfo() | Comprehensive diagnostic information |
runBiometricTest() | Test biometric functionality end to end |
setDebugMode() | Enable/disable debug logging |
Logging & Monitoring
| Function | Description |
|---|---|
enableLogging() | Enable/disable the centralized logging system |
setLogLevel() | Set the minimum log level |
configureLogger() | Configure the logger with advanced options |
getLogs() | Retrieve stored log entries |
clearLogs() | Clear stored log entries |
Key Integrity Validation
| Function | Description |
|---|---|
validateKeyIntegrity() | Comprehensive key integrity validation |
verifyKeySignature() | Generate a signature with the specified key |
signWithOptions() | Sign with advanced security controls |
validateSignature() | Validate a signature against the original data |
sha256() | Native SHA-256 hashing |
getKeyAttributes() | Detailed attributes of a key |
Biometric Change Detection
| Function | Description |
|---|---|
subscribeToBiometricChanges() | Subscribe to biometric change events |
unsubscribeFromBiometricChanges() | Unsubscribe from change events |
startBiometricChangeDetection() | Start monitoring for biometric changes |
stopBiometricChangeDetection() | Stop monitoring for biometric changes |
BiometricChangeEvent | The change event type |
Error Codes
See Error Codes for the common error codes returned by authentication methods.