Skip to content

About

A lightweight and unified React Native & Expo library for biometric authentication across iOS and Android. Supports Face ID, Touch ID, and Fingerprint with a simple JavaScript API.

Topics

Resources

Code of conduct

Contributing

Stars

128 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

248 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” React Native Biometrics

A lightweight and unified React Native library for biometric authentication across iOS and Android

npm version downloads license stars typescript

iOS Support Android Support New Architecture

πŸ“– Documentation: sbaiahmed1.github.io/react-native-biometrics

🎬 Demo

React Native Biometrics Demo React Native Biometrics Demo

✨ Features

  • πŸ”’ Unified API for Face ID, Touch ID, Optic ID and Android biometrics
  • πŸ› οΈ Configurable prompts with fallback to device credentials
  • πŸ”‘ Key management with EC256 and RSA2048 keys, hardware-backed where the platform supports it
  • πŸ” Non-biometric signing with Keychain/Keystore keys, without a prompt
  • πŸ›‘οΈ Device integrity checks for rooted and jailbroken devices
  • πŸ”” Biometric change detection for enrollment changes
  • 🎯 TypeScript, a TurboModule for the new architecture, and an Expo config plugin
  • πŸ“¦ CocoaPods and Swift Package Manager on iOS

πŸ“‹ Requirements

Platform Minimum Version
React Native 0.81+

The library is a TurboModule and requires React Native's new architecture. Since version 1.0 the old architecture is not supported; apps still on it can stay on version 0.17.x.

πŸš€ Installation

npm install @sbaiahmed1/react-native-biometrics
# or
yarn add @sbaiahmed1/react-native-biometrics

Then follow the installation guide for the Expo config plugin or the manual iOS and Android permissions.

πŸ“– Usage

import {
  isSensorAvailable,
  simplePrompt,
} from '@sbaiahmed1/react-native-biometrics';

async function authenticate(): Promise<boolean> {
  const sensor = await isSensorAvailable();
  if (!sensor.available) {
    console.log('Biometrics not available:', sensor.error);
    return false;
  }

  const result = await simplePrompt('Please authenticate to continue');
  return result.success;
}

πŸ“š Documentation

The full documentation lives at sbaiahmed1.github.io/react-native-biometrics.

Getting started

Usage

API reference

Guides

More

πŸ“„ License

MIT

πŸ™ Acknowledgments

πŸ“Š Stats

contributors last commit issues pull requests

Made with ❀️ by @sbaiahmed1

⭐ Star this repo if it helped you!

Report Bug Β· Request Feature Β· Discussions

About

A lightweight and unified React Native & Expo library for biometric authentication across iOS and Android. Supports Face ID, Touch ID, and Fingerprint with a simple JavaScript API.

Topics

Resources

Code of conduct

Contributing

Stars

128 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages