Socket
Socket
Sign inDemoInstall

react-native-keychain

Package Overview
Dependencies
0
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-rc.3 to 3.0.0

2

package.json
{
"name": "react-native-keychain",
"version": "3.0.0-rc.3",
"version": "3.0.0",
"description": "Keychain Access for React Native",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -31,3 +31,3 @@ <p align="center"><img src="https://user-images.githubusercontent.com/378279/36642269-6195b10c-1a3d-11e8-9e1b-37a3d1bcf7b3.png" align="center" width="150" height="201" alt="" /></p>

// Retreive the credentials
const credentials = Keychain.getGenericPassword();
const credentials = await Keychain.getGenericPassword();
if (credentials) {

@@ -51,7 +51,7 @@ console.log('Credentials successfully loaded for user ' + credentials.username);

Will store the username/password combination in the secure storage. Resolves to `{ username, password }` if an entry exists or `false` if it doesn't.
Will store the username/password combination in the secure storage. Resolves to `true` or rejects in case of an error.
### `getGenericPassword([{ authenticationPrompt, service }])`
Will retreive the username/password combination from the secure storage. It will reject only if an unexpected error is encountered like lacking entitlements or permission.
Will retreive the username/password combination from the secure storage. Resolves to `{ username, password }` if an entry exists or `false` if it doesn't. It will reject only if an unexpected error is encountered like lacking entitlements or permission.

@@ -58,0 +58,0 @@ ### `resetGenericPassword([{ service }])`

@@ -14,7 +14,33 @@ declare module 'react-native-keychain' {

export enum SecAccessible {
WHEN_UNLOCKED = "AccessibleWhenUnlocked",
AFTER_FIRST_UNLOCK = "AccessibleAfterFirstUnlock",
ALWAYS = "AccessibleAlways",
WHEN_PASSCODE_SET_THIS_DEVICE_ONLY = "AccessibleWhenPasscodeSetThisDeviceOnly",
WHEN_UNLOCKED_THIS_DEVICE_ONLY = "AccessibleWhenUnlockedThisDeviceOnly",
AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY = "AccessibleAfterFirstUnlockThisDeviceOnly",
ALWAYS_THIS_DEVICE_ONLY = "AccessibleAlwaysThisDeviceOnly"
}
export enum SecAccessControl {
USER_PRESENCE = "UserPresence",
BIOMETRY_ANY = "BiometryAny",
BIOMETRY_CURRENT_SET = "BiometryCurrentSet",
DEVICE_PASSCODE = "DevicePasscode",
APPLICATION_PASSWORD = "ApplicationPassword",
BIOMETRY_ANY_OR_DEVICE_PASSCODE = "BiometryAnyOrDevicePasscode",
BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE = "BiometryCurrentSetOrDevicePasscode"
}
export enum LAPolicy {
DEVICE_PASSCODE_OR_BIOMETRICS = "AuthenticationWithBiometricsDevicePasscode",
BIOMETRICS = "AuthenticationWithBiometrics"
}
export interface Options {
accessControl?: string;
accessControl?: SecAccessControl;
accessGroup?: string;
accessible?: SecAccessible;
authenticationPrompt?: string;
authenticationType?: string;
authenticationType?: LAPolicy;
service?: string;

@@ -21,0 +47,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc