{"id":16741,"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.","status":"active","version":"0.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/huhuanming/react-native-check-biometric-auth-changed","tags":["javascript","react-native","ios","android","typescript"],"install":[{"cmd":"npm install react-native-check-biometric-auth-changed","lang":"bash","label":"npm"},{"cmd":"yarn add react-native-check-biometric-auth-changed","lang":"bash","label":"yarn"},{"cmd":"pnpm add react-native-check-biometric-auth-changed","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required by React Native modules.","package":"react","optional":false},{"reason":"Core dependency for any React Native module, providing native bridge access.","package":"react-native","optional":false}],"imports":[{"note":"This is a named export. The README's `multiply` example is boilerplate and not representative of the actual API.","wrong":"import checkBiometricAuthChanged from 'react-native-check-biometric-auth-changed'; // Not a default export","symbol":"checkBiometricAuthChanged","correct":"import { checkBiometricAuthChanged } from 'react-native-check-biometric-auth-changed';"},{"note":"This named export is used to check if biometric authentication is set up on the device.","wrong":"const { isBiometricAuthAvailable } = require('react-native-check-biometric-auth-changed'); // CommonJS is not the primary pattern for modern RN modules.","symbol":"isBiometricAuthAvailable","correct":"import { isBiometricAuthAvailable } from 'react-native-check-biometric-auth-changed';"}],"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."},"warnings":[{"fix":"Use exact version pinning (e.g., `\"react-native-check-biometric-auth-changed\": \"0.1.1\"`) and manually review updates for breaking changes.","message":"As this package is in a very early version (0.1.1), breaking changes may occur in minor or even patch releases. Developers should pin exact versions and carefully review release notes before updating.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Refer to the source code (e.g., `src/index.ts` in the GitHub repository) or npm package contents to find the correct API exports and their usage.","message":"The `multiply` function shown in the README is boilerplate and does not represent the package's actual functionality. The true exports are `checkBiometricAuthChanged` and `isBiometricAuthAvailable`.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Ensure you have run `pod install` in your `ios/` directory for iOS and rebuilt your Android project after installation. Avoid using Expo Go for development with native modules that aren't part of the Expo SDK.","message":"Like many React Native native modules, this package requires proper linking to the native projects (iOS and Android). Failure to do so will result in runtime errors stating the package is not linked.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Pair this library with a general biometric authentication library (e.g., `react-native-biometrics` or `expo-local-authentication`) if you also need to prompt the user for biometric verification.","message":"This package is specifically designed to detect *changes* in biometric authentication settings, not to perform authentication prompts itself. You will need another library for the actual biometric authentication UI.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"For iOS, navigate to your `ios/` directory and run `pod install`. Rebuild your entire React Native application after installation (e.g., `npx react-native run-ios` or `npx react-native run-android`). If using Expo, ensure you are in a bare workflow or using a custom development client, not Expo Go.","cause":"The native module was not correctly linked into your iOS or Android project, or you are running in an unsupported environment like Expo Go.","error":"The package 'react-native-check-biometric-auth-changed' doesn't seem to be linked. Make sure: - You have run 'pod install' - You rebuilt the app after installing the package - You are not using Expo Go"},{"fix":"Replace calls to `multiply` with the correct functions: `checkBiometricAuthChanged()` or `isBiometricAuthAvailable()`. Refer to the package's source code or its intended documentation for accurate API usage.","cause":"You are attempting to call the boilerplate `multiply` function from the initial `create-react-native-library` template, which is not the actual API exposed by this package.","error":"TypeError: (0, _reactNativeCheckBiometricAuthChanged.multiply) is not a function"}],"ecosystem":"npm"}