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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@ziogene/capacitor-biometric-keychain

v4.0.5

Published

Uses Keychain and Keystore on ios and android respectively to give a secure localStorage like API that uses a biometric lock for read and update operations

Readme

BiometricNativePlugin

BiometricNativePlugin provides secure, key-value storage using the device's biometric authentication (e.g., Face ID, Touch ID, or Fingerprint). It is designed for hybrid mobile applications (Ionic/Cordova/Capacitor) needing secure, user-verified access to sensitive data.


Table of Contents


Interface

export interface BiometricNativePlugin {
  getItem(options: { key: string }): Promise<{ value: string; error?: any; }>;
  setItem(options: { key: string; value: string }): Promise<{ error?: any }>;
  removeItem(options: { key: string }): Promise<{ error?: any }>;
}

Methods

getItem

Description:
Asynchronously retrieves a value from secure storage. Biometric authentication is always required.

Parameters:

  • options.key (string, required): The key to be retrieved.

Returns:
A Promise resolving to:

{
  value: string;    // The retrieved value (if found)
  error?: any;      // Error, in case retrieval or authentication fails
}

setItem

Description:
Asynchronously stores a value into secure storage.

  • On Android: Will always require biometric authentication.
  • On iOS: Biometric authentication is required only if overwriting an existing key.

Parameters:

  • options.key (string, required): Key to store or update.
  • options.value (string, required): Value to associate with the key.

Returns:
A Promise resolving to:

{
  error?: any; // Error, if storage or authentication fails
}

removeItem

Description:
Asynchronously removes a key from secure storage.

Biometric authentication is never invoked on either platform.

Parameters:

  • options.key (string, required): Key to remove.

Returns:
A Promise resolving to:

{
  error?: any; // Error, if removal fails
}

Platform-Specific Behavior

| Method | Android – Biometric Required | iOS – Biometric Required | |--------------|:---------------------------:|:-------------------------------:| | getItem | ✔️ Always | ✔️ Always | | setItem | ✔️ Always | ✔️ Only if overwriting a key | | removeItem | ❌ Never | ❌ Never |


Usage Examples

// Retrieve a secure value (will prompt for biometrics)
const result = await BiometricNativePlugin.getItem({ key: 'mySecretKey' });

// Save a secure value (will prompt for biometrics per platform rules)
await BiometricNativePlugin.setItem({ key: 'mySecretKey', value: 'topSecret' });

// Remove a secure value (will NOT prompt for biometrics)
await BiometricNativePlugin.removeItem({ key: 'mySecretKey' });

Error Handling

All methods return an error object if an operation fails, including biometric authentication failures.
Always handle errors in your implementation to ensure a robust user experience.


Notes

  • This plugin is suitable for use with hybrid mobile frameworks such as Ionic, Capacitor, or Cordova.
  • For more information about biometric APIs, refer to the Android and Apple official documentation.