Package Exports
- react-native-onepassword
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-onepassword) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-native-onepassword
React Native integration with the OnePassword extension.
Install
Install project as a dependency:
npm install --save react-native-onepasswordLink library to Xcode project (see the React documentation).
If your app supports iOS 7.1 or earlier, view the OnePassword documentation for applicable steps.
Basic usage
Public Methods
isSupported(): Promise
Checks if the OnePassword extension is availabile on the current platform.
var OnePassword = require("react-native-onepassword");
OnePassword.isSupported()
.then(
() => {
console.log("OnePassword app is installed and ready!")
},
() => {
console.log("OnePassword not available.");
}
);findLogin(url:String): Promise
Opens the OnePassword extension, filtering the list of logins by the URL you provide. When the user selects a login, the credentials are passed to the callback function as plaintext.
If you are unsure what URL to pass, see the OnePassword documentation.
OnePassword.findLogin("https://example.com/login")
.then((credentials) => {
// User selected a login.
doSomethingWith(credentials.username);
doSomethingElseWith(credentials.password);
})