Code Monkey home page Code Monkey logo

cordova-plugin-fingerprint's Introduction

OutSystems Finger Print cordova plugin

Cordova Plugin to leverage the local authentication framework to allow in-app user authentication using Touch ID.

โš ๏ธ This plugin is SUPPORTED by OutSystems. Customers entitled to Support Services may obtain assistance through Support.

Supported Platforms

  • iOS
  • Android

Dependencies

  • cordova-plugin-fingerprint-aio
  • cordova-plugin-touchid

Installation

  • Run the following command:
     cordova plugin add https://bitbucket.org/uxmobile/fingerprint-cordova-plugin.git

#Setup for Android Add preference to mobile-config.js

App.setPreference('android-targetSdkVersion', '23');

set compile version and build tools in build.gradle

compileSdkVersion 23
buildToolsVersion "23.0.2"

Usage

You do not need to reference any JavaScript, the Cordova plugin architecture will add a touchid object to your root automatically when you build.

Ensure you use the plugin after your deviceready event has been fired.

Authenticate

Pass the following arguments to the authenticate() function, to prompt the user to authenticate via TouchID:

  1. Success callback (called on successful authentication)
  2. Failure callback (called on error or if authentication fails)
  3. Object with configuration*
touchid.authenticate(successCallback, failureCallback, object);

Config Object for

Param Type Default Description
clientId String undefined (REQUIRED) Used as the alias for your key in the Android Key Store.
clientSecret String undefined (REQUIRED) Used to encrypt the token returned upon successful fingerprint authentication.
disableBackup boolean false Set to true to remove the "USE BACKUP" button
maxAttempts number 5 The device max is 5 attempts. Set this parameter if you want to allow fewer than 5 attempts.
locale String "en_US" Change the language displayed on the authentication dialog.
  • English: "en_US"
  • Spanish: "es"
  • Russian: "ru"
  • French: "fr"
  • Chinese (Simplified):
    • "zh_CN"
    • "zh_SG"
  • Chinese (Traditional):
    • "zh"
    • "zh_HK"
    • "zh_TW"
    • "zh_MO"
  • Norwegian: "no"
userAuthRequired boolean true Require the user to authenticate with a fingerprint to authorize every use of the key. New fingerprint enrollment will invalidate key and require backup authenticate to re-enable the fingerprint authentication dialog.
dialogTitle String undefined Set the title of the fingerprint authentication dialog.
dialogMessage String undefined (REQUIRED) Set the message of the fingerprint authentication dialog.
dialogHint String undefined Set the hint displayed by the fingerprint icon on the fingerprint authentication dialog.

*NOTE: The dialogMessage you present to the user should provide a clear reason for why you are requesting they authenticate themselves, and what action you will be taking based on that authentication.

Check support

Although the authenticate() function will return an error if the user is unable to authenticate via Touch ID, you may wish to check support without prompting the user to authenticate. This can be done by passing following arguments to the checkSupport() function:

  1. Success callback (called if authentication is possible)
  2. Not supported callback (called if policy can not be evaluated, with error message)
touchid.checkSupport(successCallback, notSupportedCallback);

Platforms

iOS 8+ Android 23+

Contributors

Document author

Copyright OutSystems, 2016


LICENSE

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cordova-plugin-fingerprint's People

Contributors

alexgerardojacinto avatar bgracio avatar brunojazevedo avatar carlscorrea avatar dmlgx avatar eiyuuzack avatar felipecn avatar it-mikes avatar jgrazina avatar luissilvaos avatar nflsilva avatar os-martacarlos avatar pmaroco avatar vmfo22 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-fingerprint's Issues

Android SDK version 23 out of support

Any plans to upgrade the SDK in the near future?

Would this be the reason for getting "TouchId is not defined" error message in the mobile app build through the Outsystems while using TouchId plugin in it?

Thanks.

How to use TouchOptions?

Hi,

I need to know the requirement of TouchOptions.

Can I make use of it to store the username and password so that when user authenticates through Faceid, their credentials are fetched from TouchOptions data and then used to authenticate user using Login web service?

If not, what are the possible ways to authenticate the user via FaceId and auto-login them into the app?

Regards,

Shreyas Bhondve

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.