Giter Club home page Giter Club logo

cordova-plugin-ios-keychain's Introduction

Keychain Plugin for Apache Cordova

created by Shazron Abdullah

Updated by Max Lynch [email protected]

Installation

cordova plugin add https://github.com/ionic-team/cordova-plugin-ios-keychain

iCloud keychain enabled

iCloud keychain synchonizing is enabled, so the keychain will be mirrored across all devices if the user is signed in to iCloud (Settings > iCloud) and has iCloud keychain turned on (Settings > iCloud > Keychain)

Usage

See the example folder for example usage.

/*
 Retrieves all value/key pairs
 
 @param successCallback returns the value as the argument to the callback when successful
 @param failureCallback returns the error string as the argument to the callback, for a failure
 @param key the key to retrieve
 @param TouchIDMessage the message to show underneath the TouchID prompt (if any)
 */
Keychain.getAll(successCallback, failureCallback, 'TouchID Message');


/*
 Retrieves a value for a key
 
 @param successCallback returns the value as the argument to the callback when successful
 @param failureCallback returns the error string as the argument to the callback, for a failure
 @param key the key to retrieve
 @param TouchIDMessage the message to show underneath the TouchID prompt (if any)
 */
Keychain.get(successCallback, failureCallback, 'key', 'TouchID Message');

/*
 Sets a value for a key
 
 @param successCallback returns when successful
 @param failureCallback returns the error string as the argument to the callback, for a failure
 @param key the key to set
 @param value the value to set
 @param useTouchID whether to store the value with security such that TouchID will be needed to grab it
 */
Keychain.set(successCallback, failureCallback, 'key', 'value', useTouchID);

/*
 Removes a value for a key
 
 @param successCallback returns when successful
 @param failureCallback returns the error string as the argument to the callback
 @param key the key to remove
 */
Keychain.remove(successCallback, failureCallback, 'key');

/*
 Sets a JSON value for a key 
 
 @param successCallback returns when successful
 @param failureCallback returns the error string as the argument to the callback, for a failure
 @param key the key to set
 @param value the value to set
 @param useTouchID whether to store the value with security such that TouchID will be needed to grab it
 */
Keychain.setJson(successCallback, failureCallback, 'key', 'value', useTouchID);

/*
 Gets a JSON value for a key 
 
 @param successCallback returns when successful
 @param failureCallback returns the error string as the argument to the callback, for a failure
 @param key the key to set
 @param value the value to set
 @param useTouchID whether to store the value with security such that TouchID will be needed to grab it
 */
Keychain.getJson(successCallback, failureCallback, 'key', useTouchID);

License

Apache 2.0 License except for the Auth0 SimpelKeychain code that is under MIT

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.