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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@marianj97/react-native-biometrics

v1.0.3

Published

A forked repository that comes from SelfLender/react-native-biometrics and includes React Native biometric functionality for signing and encryption that allows additional options when generating keys (more added later)

Downloads

143

Readme

@marianJ97/react-native-biometrics

This is fork from the SelfLender/react-native-biometrics repository It allows additional options when generating keys, for now only accesGroup for ios (more added later). Fork is made from react-native-biometrics version 3.0.0 For official documentation and more informations, reach SelfLender/react-native-biometrics repository.

React native biometrics is a simple bridge to native iOS and Android keystore management. It allows you to create public private key pairs that are stored in native keystores and protected by biometric authentication. Those keys can then be retrieved later, after proper authentication, and used to create a cryptographic signature.

React Native Compatibility

| @marianJ97/react-native-biometrics version | Required React Native Version | | :------------------------------------------: | :---------------------------: | | >= 1.0.0 | >= 0.60 |

Getting started

using either Yarn:

yarn add @marianJ97/react-native-biometrics

or npm:

$ npm install @marianJ97/react-native-biometrics --save

Install pods

$ npx pod-install

Link / Autolinking

On React Native 0.60+ the CLI autolink feature links the module while building the app.

Additional configuration

iOS

This package requires an iOS target SDK version of iOS 10 or higher

Ensure that you have the NSFaceIDUsageDescription entry set in your react native iOS project, or Face ID will not work properly. This description will be presented to the user the first time a biometrics action is taken, and the user will be asked if they want to allow the app to use Face ID. If the user declines the usage of face id for the app, the isSensorAvailable function will indicate biometrics is unavailable until the face id permission is specifically allowed for the app by the user.

Android

This package requires a compiled SDK version of 29 (Android 10.0) or higher

Usage

All other cases are identical, so for more information reach SelfLender/react-native-biometrics repository.

Difference

createKeys()

Generates a public private RSA 2048 key pair that will be stored in the device keystore. Returns a Promise that resolves to an object providing details about the keys.

Parameters Object

| Property | Type | Description | | ----------- | ------ | ---------------------------------------------------------------------------- | | accessGroup | string | String representation of accessGroup in which will be keys stored (iOS only) |

Result Object

| Property | Type | Description | | --------- | ------ | --------------------------------------------------- | | publicKey | string | A base64 encoded string representing the public key |

Example

import ReactNativeBiometrics from "react-native-biometrics";

const rnBiometrics = new ReactNativeBiometrics();

rnBiometrics.createKeys().then((resultObject) => {
  const { publicKey } = resultObject;
  console.log(publicKey);
  sendPublicKeyToServer(publicKey);
});

iOS Example

import ReactNativeBiometrics from "react-native-biometrics";

const rnBiometrics = new ReactNativeBiometrics();

rnBiometrics
  .createKeys({ accessGroup: "yourGroupIdentifier" })
  .then((resultObject) => {
    const { publicKey } = resultObject;
    console.log(publicKey);
    sendPublicKeyToServer(publicKey);
  });