refactor: rename package to RNAuthentication and update dependencies
feat: add postinstall script for patch-package fix: update react-native-biometrics to support device credentials refactor: remove FaceAuth, Home, LockScreen, Managelock, and related auth files chore: update TypeScript configuration for React Native
This commit is contained in:
35
README.md
35
README.md
@@ -95,3 +95,38 @@ To learn more about React Native, take a look at the following resources:
|
||||
- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
|
||||
- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
|
||||
- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.
|
||||
|
||||
<!-- node_modules/react-native-bometrics/android/src/main/java/com/rnbiometrics/ReactNativeBiometrics.java -->
|
||||
|
||||
line no 185 to 214
|
||||
private BiometricPrompt.PromptInfo getPromptInfo(
|
||||
String promptMessage,
|
||||
String cancelButtonText,
|
||||
boolean allowDeviceCredentials
|
||||
) {
|
||||
BiometricPrompt.PromptInfo.Builder builder =
|
||||
new BiometricPrompt.PromptInfo.Builder()
|
||||
.setTitle(promptMessage);
|
||||
|
||||
builder.setAllowedAuthenticators(
|
||||
getAllowedAuthenticators(allowDeviceCredentials)
|
||||
);
|
||||
|
||||
if (!allowDeviceCredentials || isCurrentSDK29OrEarlier()) {
|
||||
builder.setNegativeButtonText(cancelButtonText);
|
||||
}
|
||||
|
||||
return builder.build();
|
||||
|
||||
}
|
||||
|
||||
private int getAllowedAuthenticators(boolean allowDeviceCredentials) {
|
||||
int authenticators = BiometricManager.Authenticators.BIOMETRIC_WEAK;
|
||||
|
||||
if (allowDeviceCredentials) {
|
||||
authenticators |= BiometricManager.Authenticators.DEVICE_CREDENTIAL;
|
||||
}
|
||||
|
||||
return authenticators;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user