Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
canImplyAuthentication,
getGenericPassword,
getInternetCredentials,
getSupportedBiometryType,
hasInternetCredentials,
requestSharedWebCredentials,
resetGenericPassword,
resetInternetCredentials,
setGenericPassword,
setInternetCredentials,
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',
};
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
setInternetCredentials();
setInternetCredentials('server', 'username', 'password');
setInternetCredentials('server', 'username', 'password', simpleOptions).then(
result => {
(result: void);
}
);