react-native-biometric-verifier 0.0.40 → 0.0.41

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.
Files changed (2) hide show
  1. package/package.json +16 -3
  2. package/src/index.js +23 -1
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "react-native-biometric-verifier",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "description": "A React Native module for biometric verification with face recognition and QR code scanning",
5
5
  "main": "src/index.js",
6
+ "private": false,
7
+ "license": "UNLICENSED",
8
+ "author": "PRAFUL DAS M M",
6
9
  "scripts": {
7
10
  "test": "echo \"Error: no test specified\" && exit 1"
8
11
  },
@@ -13,8 +16,18 @@
13
16
  "face-recognition",
14
17
  "qr-code"
15
18
  ],
16
- "author": "PRAFULDAS M M",
17
- "license": "JESCON TECHNOLOGIES PVT LTD THRISSUR, KERALA, INDIA",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/jescon-technologies/react-native-biometric-verifier"
22
+ },
23
+ "bugs": {
24
+ "url": "https://github.com/jescon-technologies/react-native-biometric-verifier/issues"
25
+ },
26
+ "homepage": "https://github.com/jescon-technologies/react-native-biometric-verifier#readme",
27
+ "files": [
28
+ "src",
29
+ "README.md"
30
+ ],
18
31
  "peerDependencies": {
19
32
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
20
33
  "react-native": ">=0.60.0",
package/src/index.js CHANGED
@@ -376,7 +376,28 @@ const BiometricModal = React.memo(
376
376
  );
377
377
 
378
378
  if (distance <= Global.MaxDistanceMeters) {
379
+ const locationDetails = {
380
+ qrLocation: {
381
+ latitude: lat,
382
+ longitude: lng,
383
+ },
384
+ deviceLocation: {
385
+ latitude: location.latitude,
386
+ longitude: location.longitude,
387
+ accuracy: location.accuracy,
388
+ },
389
+ distanceMeters: distance,
390
+ verified: true,
391
+ verifiedAt: new Date().toISOString(),
392
+ };
393
+
394
+ responseRef.current = {
395
+ ...(responseRef.current || {}), // existing faceData
396
+ location: locationDetails,
397
+ };
398
+
379
399
  safeCallback(responseRef.current);
400
+
380
401
  notifyMessage("Location verified successfully!", "success");
381
402
 
382
403
  updateState({
@@ -392,7 +413,8 @@ const BiometricModal = React.memo(
392
413
  resetTimeoutRef.current = setTimeout(() => {
393
414
  resetState();
394
415
  }, 1200);
395
- } else {
416
+ }
417
+ else {
396
418
  handleProcessError(
397
419
  `Location mismatch (${distance.toFixed(0)}m away).`
398
420
  );