Registry / auth-security / react-native-check-biometric-auth-changed

react-native-check-biometric-auth-changed

JSON →
library0.1.1jsnpmunverified

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.

npm install react-native-check-biometric-auth-changed
INSTALL
IMPORT
SIG · REACT-NATIVE-CHECK
R
react-native-check-biometric-auth-changed
auth-securityjavascriptv0.1.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

checkBiometricAuthChanged
import { checkBiometricAuthChanged } from 'react-native-check-biometric-auth-changed';
import checkBiometricAuthChanged from 'react-native-check-biometric-auth-changed'; // Not a default export
This is a named export. The README's `multiply` example is boilerplate and not representative of the actual API.
isBiometricAuthAvailable
import { isBiometricAuthAvailable } from 'react-native-check-biometric-auth-changed';
const { isBiometricAuthAvailable } = require('react-native-check-biometric-auth-changed'); // CommonJS is not the primary pattern for modern RN modules.
This named export is used to check if biometric authentication is set up on the device.

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.

import { checkBiometricAuthChanged, isBiometricAuthAvailable } from 'react-native-check-biometric-auth-changed'; import { useEffect, useState } from 'react'; import { Alert } from 'react-native'; const BiometricStatusChecker = () => { const [biometricsChanged, setBiometricsChanged] = useState(false); const [biometricsSupported, setBiometricsSupported] = useState(false); useEffect(() => { const checkBiometrics = async () => { try { const available = await isBiometricAuthAvailable(); setBiometricsSupported(available); if (available) { const changed = await checkBiometricAuthChanged(); setBiometricsChanged(changed); if (changed) { Alert.alert( 'Security Alert', 'Your biometric authentication settings have changed. Please re-authenticate or re-enroll for security purposes.' ); } else { console.log('Biometric settings are unchanged.'); } } else { console.log('Biometric authentication is not available or enrolled.'); } } catch (error) { console.error('Failed to check biometric status:', error); Alert.alert('Error', 'Could not check biometric status: ' + error.message); } }; checkBiometrics(); }, []); return ( // Your component rendering logic based on biometricsChanged and biometricsSupported // For example, display a message or trigger a re-authentication flow null ); }; export default BiometricStatusChecker;
Debug
Known issues
breakingAs 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.
fix
Use exact version pinning (e.g., `"react-native-check-biometric-auth-changed": "0.1.1"`) and manually review updates for breaking changes.
affects: <1.0.0
gotchaThe `multiply` function shown in the README is boilerplate and does not represent the package's actual functionality. The true exports are `checkBiometricAuthChanged` and `isBiometricAuthAvailable`.
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.
affects: >=0.1.0
gotchaLike 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.
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.
affects: >=0.1.0
gotchaThis 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.
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.
affects: >=0.1.0
Errors
Common errors & fixes
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
The native module was not correctly linked into your iOS or Android project, or you are running in an unsupported environment like Expo Go.
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.
TypeError: (0, _reactNativeCheckBiometricAuthChanged.multiply) is not a function
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.
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.
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies
reactrequiredPeer dependency required by React Native modules.
react-nativerequiredCore dependency for any React Native module, providing native bridge access.
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
react-native-check-biometric-auth-changed — npm install react-native-check-biometric-auth-changed · libregistry