2.0.0 • Published 9 months ago

@flowmoco/capacitor-biometric-keychain v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

capacitor-biometric-keychain

Uses Keychain and Keystore on ios and android respectively to give a secure localStorage like API that uses a biometric lock for read and update operations

Capacitor v5 Android minSdkVersion 23 iOS min version 13.0

Install

npm install @flowmoco/capacitor-biometric-keychain
npx cap sync

iOS

To enable FaceID, you must set the the NSFaceIDUsageDescription key.

<key>NSFaceIDUsageDescription</key>
<string>[Reason why your app needs FaceID]</string>

Import

import { BiometricNative } from "@flowmoco/capacitor-biometric-keychain";

API

getItem(...)

getItem(options: { key: string; }) => Promise<{ value: string; error?: any; }>

Async get an item from the secure storage. Will invoke device biometric authentication.

ParamType
options{ key: string; }

Returns: Promise<{ value: string; error?: any; }>


setItem(...)

setItem(options: { key: string; value: string; }) => Promise<{ error?: any; }>

Async set an item in secure storage. Will invoke device biometric authentication on Android and only on iOS if overwriting an existing key.

ParamType
options{ key: string; value: string; }

Returns: Promise<{ error?: any; }>


removeItem(...)

removeItem(options: { key: string; }) => Promise<{ error?: any; }>

Async remove an item from the secure storage. Will not invoke device biometric authentication either platform.

ParamType
options{ key: string; }

Returns: Promise<{ error?: any; }>


2.0.0

9 months ago

1.0.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago