You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When `showModal` is `true`, an Android native prompt will show up asking for user's authentication. This behavior is similar to that of iOS.
12
+
13
+
You can control strings associated with a modal prompt via `strings` option:
14
+
15
+
```javascript
16
+
strings: {
17
+
header:'Sign in',
18
+
description:'Place finger to authenticate',
19
+
hint:'Touch',
20
+
success:'Fingerprint recognized',
21
+
notRecognized:'Fingerprint not recognized, try again',
22
+
cancel:'Cancel',
23
+
cancelled:'Authentication was cancelled', // reject error message
24
+
}
25
+
```
26
+
27
+
## setInvalidatedByBiometricEnrollment
28
+
29
+
If you want to control the behaviour on android when new fingers are enrolled or removed on the device on any device with API level greater than 24. You should call during the initialization of your app to the function `setInvalidatedByBiometricEnrollment`. This will re-initialise the internal android Key generator with the flag set to keep/invalidate the credentials upon fingers change.
30
+
31
+
```javascript
32
+
importSInfofrom'react-native-sensitive-info';
33
+
34
+
SInfo.setInvalidatedByBiometricEnrollment(false);
35
+
```
36
+
37
+
[You can check out more here](https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.Builder#setInvalidatedByBiometricEnrollment(boolean))
Copy file name to clipboardExpand all lines: website/docs/overview.md
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,4 +8,35 @@ RNSInfo is an open-source library developed by many contributors since 2016. ❤
8
8
9
9
Securing sensitive data is very important in production-ready applications. So, this is why RNSInfo was created for, to help you focus in what matters most, your application. 😉
10
10
11
-
Handling sensitive data couldn't be easier in React-Native apps.
11
+
Handling sensitive data couldn't be easier in React-Native apps.
Jailbroken/Rooted devices can access your iOS' Keystore and Android's shared preferences/keystore in plain text, so it is necessary to add another layer of protection.
8
+
9
+
-**iOS:** it is implemented through [Access Control](https://developer.apple.com/documentation/security/secaccesscontrol). Everytime the app wants to access the protected keychain item, a prompt by iOS will show up. Only after authentication success will return the requested item.
10
+
11
+
-**Android** it is implemented through [FingerprintManager](https://developer.android.com/reference/android/hardware/fingerprint/FingerprintManager.html) + Keystore. Keystore has a function called `setUserAuthenticationRequired` which makes Keystore requires user authentication before getting value. However, Android doesn't nicely asks user to scan their finger, it just throws error this is why FingerprintManager comes in. However (AGAIN), FingerprintManager doesn't prompt automatically for you, so you need to build UI yourself to let user to know that it is time to scan his/her fingerprint.
0 commit comments