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

@ashish-trinade/capacitor-bio-auth

v0.0.4

Published

Facial And Finger Print Authentication

Downloads

14

Readme

@ashish-trinade/capacitor-bio-auth

Facial And Finger Print Authentication

Install

npm install @ashish-trinade/capacitor-bio-auth
npx cap sync

API

echo(...)

echo(options: { value: string; }) => any

| Param | Type | | ------------- | ------------------------------- | | options | { value: string; } |

Returns: any


checkBiometry()

checkBiometry() => any

Returns: any


setBiometryType(...)

setBiometryType(type: BiometryType | string | undefined) => void

| Param | Type | | ---------- | --------------------------------------------------------------- | | type | string | BiometryType |


authenticate(...)

authenticate(options?: AuthenticateOptions | undefined) => any

| Param | Type | | ------------- | ------------------------------------------------------------------- | | options | AuthenticateOptions |

Returns: any


addResumeListener(...)

addResumeListener(listener: ResumeListener) => void

| Param | Type | | -------------- | -------------------------------------------------------------------------------------- | | listener | (info: CheckBiometryResult) => void |


Interfaces

CheckBiometryResult

| Prop | Type | Description | | ------------------ | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | isAvailable | boolean | True if the device has biometric authentication capability and the current user has enrolled in biometry. | | biometryType | BiometryType | The type of biometry available on the device. | | reason | string | If biometry is not available and the system gives a reason why, it will be returned here. Otherwise it's an empty string. |

AuthenticateOptions

| Prop | Type | Description | | --------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | reason | string | The reason for requesting authentication. Displays in the authentication dialog presented to the user. If not supplied, a default message is displayed. | | cancelTitle | string | iOS: The system presents a cancel button during biometric authentication to let the user abort the authentication attempt. The button appears every time the system asks the user to present a finger registered with Touch ID. For Face ID, the button only appears if authentication fails and the user is prompted to try again. Either way, the user can stop trying to authenticate by tapping the button. Android: The text for the negative button. This would typically be used as a "Cancel" button, but may be also used to show an alternative method for authentication, such as a screen that asks for a backup password. Default: "Cancel" | | allowDeviceCredential | boolean | * If true, allows for authentication using device unlock credentials. Default is false. iOS: If biometry is available, enrolled, and not disabled, the system uses that first. After the first Touch ID failure or second Face ID failure, if iosFallbackTitle is not an empty string, a fallback button appears in the authentication dialog. If the user taps the fallback button, the system prompts the user for the device passcode or the user’s password. If iosFallbackTitle is an empty string, no fallback button will appear. If biometry is not available, enrolled and enabled, and a passcode is set, the system immediately prompts the user for the device passcode or user’s password. Authentication fails with the error code passcodeNotSet if the device passcode isn’t enabled. If a passcode is not set on the device, a passcodeNotSet error is returned. The system disables passcode authentication after 6 unsuccessful attempts, with progressively increasing delays between attempts. The title of the fallback button may be customized by setting iosFallbackTitle to a non-empty string. Android: The user will first be prompted to authenticate with biometrics, but also given the option to authenticate with their device PIN, pattern, or password by tapping a button in the authentication dialog. The title of the button is supplied by the system. | | iosFallbackTitle | string | The system presents a fallback button when biometric authentication fails — for example, because the system doesn’t recognize the presented finger, or after several failed attempts to recognize the user’s face. If allowDeviceCredential is false, tapping this button dismisses the authentication dialog and returns the error code userFallback. If undefined, the localized systetm default title is used. Passing an empty string hides the fallback button completely. If allowDeviceCredential is true and this is undefined, the localized system default title is used. | | androidTitle | string | Title for the Android dialog. If not supplied, the system default is used. | | androidSubtitle | string | Subtitle for the Android dialog. If not supplied, the system default is used. | | androidMaxAttempts | number | The maximum number of failed biometric verification attempts before returning BiometryError.authenticationFailed. The default is 3. |

Enums

BiometryType

| Members | Description | | ------------------------------- | ----------------------------------------------- | | none | No biometry is available | | touchId | iOS Touch ID is available | | faceId | iOS Face ID is available | | fingerprintAuthentication | Android fingerprint authentication is available | | faceAuthentication | Android face authentication is available | | irisAuthentication | Android iris authentication is available |