Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-fingerprint-scanner

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-fingerprint-scanner - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

2

package.json
{
"name": "react-native-fingerprint-scanner",
"version": "2.1.2",
"version": "2.1.3",
"description": "React Native Fingerprint Scanner for Android and iOS",

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

@@ -233,3 +233,3 @@ # React Native Fingerprint Scanner

### `authenticate({ description })`: (iOS)
### `authenticate({ description, fallbackEnabled })`: (iOS)
Starts Fingerprint authentication on iOS.

@@ -239,2 +239,3 @@

- `description: String` - the string to explain the request for user authentication.
- `fallbackEnabled: Boolean` - display the fallback button (e.g. Enter Password).

@@ -292,12 +293,12 @@ ```javascript

|---|---|
| LAErrorAuthenticationNotMatch | No match |
| LAErrorAuthenticationFailed | Authentication was not successful because the user failed to provide valid credentials |
| LAErrorUserCancel | Authentication was canceled by the user - e.g. the user tapped Cancel in the dialog |
| LAErrorUserFallback | Authentication was canceled because the user tapped the fallback button (Enter Password) |
| LAErrorSystemCancel | Authentication was canceled by system - e.g. if another application came to foreground while the authentication dialog was up |
| LAErrorPasscodeNotSet | Authentication could not start because the passcode is not set on the device |
| LAErrorFingerprintScannerNotAvailable | Authentication could not start because Fingerprint Scanner is not available on the device |
| LAErrorFingerprintScannerNotEnrolled | Authentication could not start because Fingerprint Scanner has no enrolled fingers |
| RCTFingerprintScannerUnknownError | Could not authenticate for an unknown reason |
| RCTFingerprintScannerNotSupported | Device does not support Fingerprint Scanner |
| AuthenticationNotMatch | No match |
| AuthenticationFailed | Authentication was not successful because the user failed to provide valid credentials |
| UserCancel | Authentication was canceled by the user - e.g. the user tapped Cancel in the dialog |
| UserFallback | Authentication was canceled because the user tapped the fallback button (Enter Password) |
| SystemCancel | Authentication was canceled by system - e.g. if another application came to foreground while the authentication dialog was up |
| PasscodeNotSet | Authentication could not start because the passcode is not set on the device |
| FingerprintScannerNotAvailable | Authentication could not start because Fingerprint Scanner is not available on the device |
| FingerprintScannerNotEnrolled | Authentication could not start because Fingerprint Scanner has no enrolled fingers |
| FingerprintScannerUnknownError | Could not authenticate for an unknown reason |
| FingerprintScannerNotSupported | Device does not support Fingerprint Scanner |

@@ -304,0 +305,0 @@ ## License

@@ -9,3 +9,3 @@ import { DeviceEventEmitter, NativeModules } from 'react-native';

DeviceEventEmitter.addListener('FINGERPRINT_SCANNER_AUTHENTICATION', (message) => {
if (message === 'LAErrorAuthenticationNotMatch' && typeof onAttempt === 'function') {
if (message === 'AuthenticationNotMatch' && typeof onAttempt === 'function') {
onAttempt(createError(message));

@@ -12,0 +12,0 @@ }

@@ -6,6 +6,5 @@ import { NativeModules } from 'react-native';

export default ({ description }) => {
const authReason = description || ' ';
export default ({ description = ' ', fallbackEnabled = true }) => {
return new Promise((resolve, reject) => {
ReactNativeFingerprintScanner.authenticate(authReason, error => {
ReactNativeFingerprintScanner.authenticate(description, fallbackEnabled, error => {
if (error) return reject(createError(error.message));

@@ -12,0 +11,0 @@ resolve(true);

const ERRORS = {
LAErrorAuthenticationNotMatch: 'No match.',
LAErrorAuthenticationFailed: 'Authentication was not successful because the user failed to provide valid credentials.',
LAErrorUserCancel: 'Authentication was canceled by the user - e.g. the user tapped Cancel in the dialog.',
LAErrorUserFallback: 'Authentication was canceled because the user tapped the fallback button (Enter Password).',
LAErrorSystemCancel: 'Authentication was canceled by system - e.g. if another application came to foreground while the authentication dialog was up.',
LAErrorPasscodeNotSet: 'Authentication could not start because the passcode is not set on the device.',
LAErrorFingerprintScannerNotAvailable: 'Authentication could not start because Fingerprint Scanner is not available on the device.',
LAErrorFingerprintScannerNotEnrolled: 'Authentication could not start because Fingerprint Scanner has no enrolled fingers.',
RCTFingerprintScannerUnknownError: 'Could not authenticate for an unknown reason.',
RCTFingerprintScannerNotSupported: 'Device does not support Fingerprint Scanner.',
AuthenticationNotMatch: 'No match.',
AuthenticationFailed: 'Authentication was not successful because the user failed to provide valid credentials.',
UserCancel: 'Authentication was canceled by the user - e.g. the user tapped Cancel in the dialog.',
UserFallback: 'Authentication was canceled because the user tapped the fallback button (Enter Password).',
SystemCancel: 'Authentication was canceled by system - e.g. if another application came to foreground while the authentication dialog was up.',
PasscodeNotSet: 'Authentication could not start because the passcode is not set on the device.',
FingerprintScannerNotAvailable: 'Authentication could not start because Fingerprint Scanner is not available on the device.',
FingerprintScannerNotEnrolled: 'Authentication could not start because Fingerprint Scanner has no enrolled fingers.',
FingerprintScannerUnknownError: 'Could not authenticate for an unknown reason.',
FingerprintScannerNotSupported: 'Device does not support Fingerprint Scanner.',
};

@@ -13,0 +13,0 @@

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc