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

capacitor4-fingerprint-auth

v0.1.2

Published

[![npm](https://img.shields.io/npm/v/capacitor-fingerprint-auth.svg)](https://www.npmjs.com/package/capacitor-fingerprint-auth) [![npm](https://img.shields.io/npm/dt/capacitor-fingerprint-auth.svg?label=npm%20downloads)](https://www.npmjs.com/package/capa

Downloads

1

Readme

Capacitor4 FingerPrint Auth

npm npm Build Status

Installation

  • npm i capacitor4-fingerprint-auth

Usage

import { FingerPrintAuth } from 'capacitor4-fingerprint-auth';
const auth = new FingerPrintAuth();
const data = await auth.available();
//
const hasFingerPrintOrFaceAuth = data.has;
const touch = data.touch;
const face = data.face;

auth.verify(
    {
        title: 'Android title', // optional title (used only on Android)
        message: 'Scan your finger', // optional (used on both platforms) - for FaceID on iOS see the notes about NSFaceIDUsageDescription
        authenticationValidityDuration: 10, // optional (used on Android, default 5)
        useCustomAndroidUI: false, // set to true to use a different authentication screen (see below)
        fallbackTitle: "Enter your PaSsWorD ", //The localized title for the fallback button in the dialog presented to the user during authentication.
        cancelTitle:"Get me out //The localized title for the cancel button in the dialog presented to the user during authentication"
    })
    .then(() => console.log("Biometric ID OK"))
    .catch(err => console.log(`Biometric ID NOT OK: ${JSON.stringify(err)}`)
    );

await auth.verifyWithFallback(); //Falls back to password on IOS

Api

| Method | Default | Type | Description | | ---------------------------------------- | ------- | ---------------------------- | ----------------------------------------------------- | | available() | | Promise<any> | Checks if the device has fingerprint/touch id / faceid support | | verify() | | Promise<any> | Shows the prompt | | verifyWithFallback() | | Promise<any> | Falls back to passcode IOS |

verify

auth.verify(
	{
	  title: 'Android title', // optional title (used only on Android)
	  message: 'Scan your finger', // optional (used on both platforms) - for FaceID on iOS see the notes about NSFaceIDUsageDescription
	  authenticationValidityDuration: 10, // optional (used on Android, default 5)
	  useCustomAndroidUI: false // set to true to use a different authentication screen (see below)
      fallbackTitle: "Enter your PaSsWorD " //The localized title for the fallback button in the dialog presented to the user during authentication.
      cancelTitle:"Get me out //The localized title for the cancel button in the dialog presented to the user during authentication"
	})
	.then(() => console.log("Biometric ID OK"))
	.catch(err => console.log(`Biometric ID NOT OK: ${JSON.stringify(err)}`)
	);

Face ID (iOS)

iOS 11 added support for Face ID and was first supported by the iPhone X. The developer needs to provide a value for NSFaceIDUsageDescription, otherwise your app may crash.

You can provide this value (the reason for using Face ID) by adding something like this to App/info.plist:

<key>NSFaceIDUsageDescription</key>
<string>For easy authentication with our app.</string>

Example Image

| IOS | Android | | --------------------------------------- | ------------------------------------------- | | Coming Soon | Coming Soon |