npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@onekeyfe/react-native-check-biometric-auth-changed

v6.7.0-62

Published

Detect stored biometric authentication state changes on iOS

Readme

@onekeyfe/react-native-check-biometric-auth-changed

Detect changes to the stored iOS biometric authentication state before trusting an existing biometric setting.

npm license iOS Nitro Modules

Compares the current iOS LocalAuthentication domain state with a persisted Keychain baseline and resolves whether it changed. OneKey uses the signal to decide whether a previously accepted biometric setting needs to be reconsidered. The package never authenticates a user, prompts for biometrics or authorizes a password operation — the application owns the authentication challenge and the policy applied to the result. This is an iOS-only signal; Android is a stub and Web is unsupported.

Features

  • One boolean signal — checkBiometricAuthChanged() answers whether the stored biometric domain state differs from the saved baseline.
  • Keychain-backed baseline — the baseline is persisted in the Keychain and shared process-wide, including across independent JavaScript runtimes.
  • Consumptive comparison — a successful check always advances the baseline, so the same changed state reports false on the next check.
  • Fail-closed errors — missing domain state or Keychain read/write failures reject instead of silently resolving false.
  • Serialized transaction — one process-wide lock covers read, compare and persist, and the work runs off the UI thread.
  • Legacy-safe migration — a legacy UserDefaults baseline participates in comparison and is removed only after the new baseline is saved.

Installation

yarn add @onekeyfe/react-native-check-biometric-auth-changed react-native-nitro-modules

Install the application's iOS pods and rebuild the native application; this is a Nitro module, so a JavaScript-only install does not register it. On iOS the pod also depends on ReactNativeNativeLogger, so include @onekeyfe/react-native-native-logger in the application's pods. No permission or Info.plist usage-description key is required because the package never prompts for biometrics.

Usage

import { checkBiometricAuthChanged } from '@onekeyfe/react-native-check-biometric-auth-changed';

try {
  const changed = await checkBiometricAuthChanged();
  if (changed) {
    // Apply the application's existing biometric re-enrollment policy.
  }
} catch {
  // The check is unavailable; keep password authentication available and do not
  // treat this as "unchanged".
}

Persist an application checkpoint before checking, and resolve a changed or unavailable result with password/passcode verification.

API

| Export | Signature | Platforms | Description | | --- | --- | :-: | --- | | checkBiometricAuthChanged() | () => Promise<boolean> | iOS | Resolves true when the domain state differs from the stored baseline, false when it matches or a first baseline was established; rejects on missing state or Keychain failure. |

There is no enrollment count, credential, event subscription or configuration option. The native interface is in src/ReactNativeCheckBiometricAuthChanged.nitro.ts and docs/SPEC.md defines the full failure and transaction contract.

Platform support

| Capability | iOS | Android | Web | | --- | :-: | :-: | :-: | | Detect biometric domain-state change | ✅ | — | — | | Persisted Keychain baseline | ✅ | — | — | | Authenticate or prompt the user | — | — | — |

Caveats

[!IMPORTANT] false is not proof that biometrics are available or that the user authenticated — on iOS it can also mean a first baseline was just established. A rejection means the check is unavailable; never substitute false for it.

[!WARNING] The comparison is consumptive: a true result advances the baseline, so the change is reported once. A security-sensitive caller must durably checkpoint that a check is in progress and require password/passcode recovery after an interrupted check; JavaScript component state alone is not sufficient.

[!NOTE] Android ships a stub that always resolves false and detects no enrollment changes, and there is no Web implementation. The package only reports a state change; it does not disable biometrics or change the application's switch.

References

License

MIT. See LICENSE.