New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

capacitor-face-id

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capacitor-face-id

Allow users to authenticate with Face ID or Touch ID on iOS devices

latest
Source
npmnpm
Version
2.0.2
Version published
Maintainers
1
Created
Source

Capacitor Face ID Plugin

npm version Build

Allow users to authenticate with Face ID or Touch ID on iOS devices

Logo

Installation

npm install capacitor-face-id

iOS Notes

iOS requires the following usage description be added and filled out for your app in Info.plist:

Name: Privacy - Face ID Usage Description
Key: NSFaceIDUsageDescription

Example

import { Plugins, PluginResultError } from '@capacitor/core';

const { FaceId } = Plugins;

...
// check if device supports Face ID or Touch ID
FaceId.isAvailable().then(checkResult => {
  if(checkResult.value) {
    FaceId.auth().then(() => {
      console.log('authenticated');
    }).catch((error: PluginResultError) => {
      // handle rejection errors
      console.error(error.message);
    });
  } else {
    // use custom fallback authentication here
  }
});

API

MethodDefaultTypeDescription
isAvailable()Promise<{ value: string }>Checks if Face ID or Touch ID is available, and returns type if so.
auth(options?: {reason?: string})options: {reason: "Access requires authentication"}Promise<void>Displays the Face ID or Touch ID screen

Keywords

capacitor

FAQs

Package last updated on 13 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts