react-native-biometric-verifier 0.0.63 → 0.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.gitattributes ADDED
@@ -0,0 +1,2 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ JESCON TECHNOLOGIES PVT LTD License
2
+
3
+ Copyright (c) 2024 PRAFULDAS M M
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,28 +1,116 @@
1
1
  # React Native Biometric Verifier
2
2
 
3
- A comprehensive biometric verification module for React Native that combines face recognition and QR code scanning with location verification.
3
+ A powerful and easy-to-use React Native module for biometric verification, featuring face recognition and QR code scanning capabilities with location validation.
4
+
4
5
 
5
6
  ## Features
6
7
 
7
- - Face recognition verification
8
- - QR code scanning
9
- - Location verification
10
- - Animated UI with state indicators
11
- - Countdown timer
12
- - Customizable notification system
13
- - Comprehensive error handling
8
+ - **Face Recognition**: Capture and verify user identity via face scan.
9
+ - **QR Code Scanning**: specialized mode for location verification using QR codes.
10
+ - **Location Validation**: Verify user presence within a specific geofence.
11
+ - **Liveness Detection**: Configurable liveness and anti-spoofing checks.
12
+ - **Customizable UI**: Animations, countdown timers, and feedback notifications.
14
13
 
15
14
  ## Installation
16
15
 
17
16
  ```bash
18
17
  npm install react-native-biometric-verifier
19
- # or
20
- yarn add react-native-biometric-verifier
21
-
22
- #<BiometricModal
23
- #data={response?.data?.userdata?.hrenemp}
24
- #apiurl={"http://his.amalaims.org:9090/"}
25
- #livenessLevel={1}
26
- #onclose={i =>{setResponse(i)}}
27
- #qrscan={response?.data?.userdata?.qrscan}
28
- #callback={() => {actionLogin(response);}}/>
18
+ ```
19
+
20
+ ### Peer Dependencies
21
+
22
+ This library relies on several peer dependencies that you must install in your project:
23
+
24
+ ```bash
25
+ npm install react-native-vector-icons react-native-geolocation-service react-native-image-resizer react-native-fs prop-types
26
+ ```
27
+
28
+ ### Platform Configuration
29
+
30
+ #### iOS
31
+ Add the following keys to your `Info.plist` file to request camera and location permissions:
32
+
33
+ ```xml
34
+ <key>NSCameraUsageDescription</key>
35
+ <string>We need access to your camera for biometric verification</string>
36
+ <key>NSLocationWhenInUseUsageDescription</key>
37
+ <string>We need your location to verify your presence at the designated area</string>
38
+ ```
39
+
40
+ #### Android
41
+ Add the following permissions to your `AndroidManifest.xml`:
42
+
43
+ ```xml
44
+ <uses-permission android:name="android.permission.CAMERA" />
45
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
46
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
47
+ ```
48
+
49
+ ## Usage
50
+
51
+ Import the `BiometricModal` component and standard React hooks.
52
+
53
+ ```javascript
54
+ import React, { useState } from 'react';
55
+ import { View, Button } from 'react-native';
56
+ import BiometricModal from 'react-native-biometric-verifier';
57
+
58
+ const App = () => {
59
+ const [isVerifierOpen, setIsVerifierOpen] = useState(false);
60
+
61
+ const handleVerificationComplete = (data) => {
62
+ console.log('Verification Success:', data);
63
+ // Handle success (e.g., navigate to next screen, show success message)
64
+ setIsVerifierOpen(false);
65
+ };
66
+
67
+ return (
68
+ <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
69
+ <Button title="Start Verification" onPress={() => setIsVerifierOpen(true)} />
70
+
71
+ {isVerifierOpen && (
72
+ <BiometricModal
73
+ data="USER_UNIQUE_ID" // e.g., Employee ID or Face ID
74
+ depKey="DEPARTMENT_KEY" // Optional: for QR location validation
75
+ apiurl="https://your-api-endpoint.com/"
76
+ onclose={(val) => setIsVerifierOpen(val)}
77
+ callback={handleVerificationComplete}
78
+ // Optional Props
79
+ qrscan={false} // Set to true to enable QR scan mode first
80
+ duration={100} // Countdown duration in seconds
81
+ MaxDistanceMeters={30} // Allowed radius for location verification
82
+ frameProcessorFps={5}
83
+ livenessLevel="high"
84
+ antispooflevel="high"
85
+ />
86
+ )}
87
+ </View>
88
+ );
89
+ };
90
+
91
+ export default App;
92
+ ```
93
+
94
+ ## Props
95
+
96
+ | Prop | Type | Required | Description | Default |
97
+ |------|------|----------|-------------|---------|
98
+ | `apiurl` | string | Yes | Base URL for the verification backend API. | - |
99
+ | `data` | string | Yes | Unique identifier for the user (e.g., Face ID, User ID). | - |
100
+ | `onclose` | function | Yes | Callback function to close the modal. | - |
101
+ | `callback` | function | Yes | Callback function returning successful verification data. | - |
102
+ | `qrscan` | boolean | No | If `true`, starts with QR code scanning mode. | `false` |
103
+ | `depKey` | string | No | Key used to validate the QR code content. | - |
104
+ | `duration` | number | No | Timeout duration for the session in seconds. | `100` |
105
+ | `MaxDistanceMeters` | number | No | Maximum allowed distance (meters) for location check. | `30` |
106
+ | `frameProcessorFps` | number | No | Frames per second for image processing. | - |
107
+ | `livenessLevel` | string | No | Liveness detection strictness. | - |
108
+ | `antispooflevel` | string | No | Anti-spoofing strictness. | - |
109
+
110
+ ## Contributing
111
+
112
+ Contributions are welcome! Please open an issue or submit a pull request for any bugs or improvements.
113
+
114
+ ## License
115
+
116
+ JESCON TECHNOLOGIES PVT LTD
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-biometric-verifier",
3
- "version": "0.0.63",
3
+ "version": "0.0.64",
4
4
  "description": "A React Native module for biometric verification with face recognition and QR code scanning",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -15,6 +15,14 @@
15
15
  ],
16
16
  "author": "PRAFULDAS M M",
17
17
  "license": "JESCON TECHNOLOGIES PVT LTD",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/dpraful/react-native-biometric-verifier.git"
21
+ },
22
+ "homepage": "https://github.com/dpraful/react-native-biometric-verifier#readme",
23
+ "bugs": {
24
+ "url": "https://github.com/dpraful/react-native-biometric-verifier/issues"
25
+ },
18
26
  "peerDependencies": {
19
27
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
20
28
  "react-native": ">=0.60.0",
@@ -29,4 +37,4 @@
29
37
  "react": "^18.0.0",
30
38
  "react-native": "^0.69.0"
31
39
  }
32
- }
40
+ }