Coder Social home page Coder Social logo

x-b-e / capacitor-biometric-keychain Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flowmoco/capacitor-biometric-keychain

0.0 0.0 0.0 212 KB

Capacitor Plugin which utilises Keystore/Keychain for Android and ios respectively and allows a localStorage-like API which uses Biometric locks for read and overwrite operations

License: MIT License

JavaScript 1.73% Ruby 3.53% Objective-C 2.95% Java 64.66% TypeScript 6.95% Swift 20.18%

capacitor-biometric-keychain's Introduction

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.

Param Type
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.

Param Type
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.

Param Type
options { key: string; }

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


capacitor-biometric-keychain's People

Contributors

charliej213 avatar drefrajo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.