-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to disable Pin/Pattern #5
Labels
enhancement
New feature or request
Comments
I use the following patch file to disable pin/pattern. Filename: diff --git a/node_modules/react-native-simple-biometrics/android/src/main/java/com/reactnativesimplebiometrics/SimpleBiometricsModule.java b/node_modules/react-native-simple-biometrics/android/src/main/java/com/reactnativesimplebiometrics/SimpleBiometricsModule.java
index d4c53a4..ab08598 100644
--- a/node_modules/react-native-simple-biometrics/android/src/main/java/com/reactnativesimplebiometrics/SimpleBiometricsModule.java
+++ b/node_modules/react-native-simple-biometrics/android/src/main/java/com/reactnativesimplebiometrics/SimpleBiometricsModule.java
@@ -23,8 +23,7 @@ public class SimpleBiometricsModule extends ReactContextBaseJavaModule {
public static final String NAME = "SimpleBiometrics";
static final int authenticators = BiometricManager.Authenticators.BIOMETRIC_STRONG
- | BiometricManager.Authenticators.BIOMETRIC_WEAK
- | BiometricManager.Authenticators.DEVICE_CREDENTIAL;
+ | BiometricManager.Authenticators.BIOMETRIC_WEAK;
public SimpleBiometricsModule(ReactApplicationContext reactContext) {
super(reactContext);
@@ -82,6 +81,7 @@ public class SimpleBiometricsModule extends ReactContextBaseJavaModule {
.setAllowedAuthenticators(authenticators)
.setTitle(title)
.setSubtitle(subtitle)
+ .setNegativeButtonText("Cancel")
.build();
prompt.authenticate(promptInfo);
diff --git a/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.mm b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.mm
index 620c8ee..e91f895 100644
--- a/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.mm
+++ b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.mm
@@ -33,10 +33,10 @@ @implementation SimpleBiometrics
{
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
- NSString *promptMessage = subtitle;
+ NSString *promptMessage = title;
LAContext *context = [[LAContext alloc] init];
- context.localizedFallbackTitle = title;
+ context.localizedFallbackTitle = @"";
LAPolicy localAuthPolicy = LAPolicyDeviceOwnerAuthenticationWithBiometrics;
if (![[UIDevice currentDevice].systemVersion hasPrefix:@"8."]) {
|
I agree this feature should be added |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
is there any possibility to hide the 'UsePin/UsePattern' form the prompt in android
Originally posted by @ndileep-dev in #3 (comment)
The text was updated successfully, but these errors were encountered: