How to use the react-native-keychain.ACCESS_CONTROL.BIOMETRY_ANY function in react-native-keychain

To help you get started, we’ve selected a few react-native-keychain examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oblador / react-native-keychain / test_index.js View on Github external
setSharedWebCredentials,
  type Options,
  type SharedWebCredentials,
} from 'react-native-keychain';

canImplyAuthentication().then(result => {
  (result: boolean);
});

const simpleOptions2: Options = {
  // $FlowExpectedError - not valid accessible value
  accessible: 'ACCESSIBLE.ALWAYS',
};

const simpleOptions: Options = {
  accessControl: ACCESS_CONTROL.BIOMETRY_ANY,
  accessible: ACCESSIBLE.ALWAYS,
  authenticationType: AUTHENTICATION_TYPE.BIOMETRICS,
  accessGroup: 'accessGroup',
  authenticationPrompt: 'authenticationPrompt',
  service: 'service',
};

canImplyAuthentication(simpleOptions).then(result => {
  (result: boolean);
});

getSupportedBiometryType().then(result => {
  (result: ?string);
});

// $FlowExpectedError - First 3 arguments are required