mirror of
https://github.com/status-im/react-native-keychain.git
synced 2026-08-27 13:01:15 +00:00
fe4642c3e09f1c088a4c5606a62ff94833347a25
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
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
Languages
Java
43%
Objective-C
24.3%
JavaScript
16.9%
C++
8.5%
CMake
4.6%
Other
2.7%