🔑 Keychain Access for React Native
Go to file
Joel Arvidsson 985923f01c Released 0.1.1 2015-05-28 19:12:26 +02:00
Enums Added keychain enums for use in types. 2015-05-21 01:51:43 +02:00
KeychainExample Added example project. 2015-05-20 20:41:10 +02:00
RNKeychain.xcodeproj Added project structure. 2015-05-20 18:23:04 +02:00
RNKeychainManager Fixed bug where getting non existing passwords would throw on ARM processors. #1 2015-05-28 19:10:41 +02:00
.editorconfig Added first implementation. 2015-05-20 20:39:52 +02:00
.gitignore Added project structure. 2015-05-20 18:23:04 +02:00
LICENSE Initial commit 2015-05-20 17:33:48 +02:00
README.md Added example project. 2015-05-20 20:41:10 +02:00
index.ios.js Added first implementation. 2015-05-20 20:39:52 +02:00
package.json Released 0.1.1 2015-05-28 19:12:26 +02:00

README.md

react-native-keychain

Keychain Access for React Native

Currently functionality is limited to just storing internet passwords. More to come...

Installation

  • $ npm install react-native-keychain
  • Right click on Libraries, select Add files to "…" and select node_modules/react-native-keychain/RNKeychain.xcodeproj
  • Select your project and under Build Phases -> Link Binary With Libraries, press the + and select libRNKeychain.a.

Usage

See KeychainExample for fully working project example.

var Keychain = require('Keychain');

var server = 'http://facebook.com';
var username = 'zuck';
var password = 'poniesRgr8';
Keychain
  .setInternetCredentials(server, username, password)
  .then(function() {
    console.log('Credentials saved successfully!')
  });

Keychain
  .getInternetCredentials(server)
  .then(function(credentials) {
    console.log('Credentials successfully loaded', credentials)
  });

Keychain
  .resetInternetCredentials(server)
  .then(function(credentials) {
    console.log('Credentials successfully deleted')
  });

License

MIT © Joel Arvidsson 2015