{"library":"react-native-check-biometric-auth-changed","title":"React Native Biometric Authentication Change Detector","description":"This package provides a React Native module to determine if a user's biometric authentication settings (e.g., fingerprint, face ID) have changed on their device since the last check. This functionality is crucial for security-sensitive applications that need to re-authenticate users if their biometric credentials might have been altered, removed, or reset. As of version 0.1.1, it offers two primary functions: `checkBiometricAuthChanged` to detect if a change has occurred and `isBiometricAuthAvailable` to ascertain if biometric authentication is even configured on the device. Given its very low version number, it is in its early development stages, suggesting a potentially irregular release cadence as new features or bug fixes are implemented. It aims to provide a cross-platform (iOS and Android) solution specifically for biometric security change detection, differentiating itself by focusing on this aspect rather than general biometric authentication processes like prompting for a scan.","language":"javascript","status":"active","last_verified":"Wed Apr 22","install":{"commands":["npm install react-native-check-biometric-auth-changed"],"cli":null},"imports":["import { checkBiometricAuthChanged } from 'react-native-check-biometric-auth-changed';","import { isBiometricAuthAvailable } from 'react-native-check-biometric-auth-changed';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { checkBiometricAuthChanged, isBiometricAuthAvailable } from 'react-native-check-biometric-auth-changed';\nimport { useEffect, useState } from 'react';\nimport { Alert } from 'react-native';\n\nconst BiometricStatusChecker = () => {\n  const [biometricsChanged, setBiometricsChanged] = useState(false);\n  const [biometricsSupported, setBiometricsSupported] = useState(false);\n\n  useEffect(() => {\n    const checkBiometrics = async () => {\n      try {\n        const available = await isBiometricAuthAvailable();\n        setBiometricsSupported(available);\n        if (available) {\n          const changed = await checkBiometricAuthChanged();\n          setBiometricsChanged(changed);\n          if (changed) {\n            Alert.alert(\n              'Security Alert',\n              'Your biometric authentication settings have changed. Please re-authenticate or re-enroll for security purposes.'\n            );\n          } else {\n            console.log('Biometric settings are unchanged.');\n          }\n        } else {\n          console.log('Biometric authentication is not available or enrolled.');\n        }\n      } catch (error) {\n        console.error('Failed to check biometric status:', error);\n        Alert.alert('Error', 'Could not check biometric status: ' + error.message);\n      }\n    };\n    checkBiometrics();\n  }, []);\n\n  return (\n    // Your component rendering logic based on biometricsChanged and biometricsSupported\n    // For example, display a message or trigger a re-authentication flow\n    null\n  );\n};\n\nexport default BiometricStatusChecker;","lang":"typescript","description":"This quickstart demonstrates how to check if biometric authentication is available on the device and if the user's biometric settings have changed, alerting the user to re-authenticate if necessary for security reasons.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}