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
@gokulkulkarni1987 , I tried your solution but I got the following error {"Authentication error is => ": {"error": [Error: Negative text must not be set if device credential authentication is allowed.]}}
@gokulkulkarni1987 , I tried your solution but I got the following error {"Authentication error is => ": {"error": [Error: Negative text must not be set if device credential authentication is allowed.]}}
I tested on two Android version 11 & 12
I fixed this issue by adding authenticationPrompt: { cancel: '' } . Furthermore, it should be handled internally in KeychainModule.java at line # 622 .
ERROR => When I add the above line, I get the following error on devices ANDROID_VERSION < 11 {"Authentication error is => ": {"error": [Error: Negative text must be set and non-empty.]}}
Expected Behavior:
It should be working on ANDROID_VERSION < 11. I don't have depth knowledge of ANDROID, But I figured out that if make some changes at line # 622 (Code of block is mentioned below). It should be resolved.
@saadi-ninjasCode We get Negative text must be set and non-empty when just BIOMETRIC_STRONG is enabled.
The fix I have added is for supporting both BIOMETRIC_STRONG & DEVICE_CREDENTIAL, which is available only after Android API 30, for DEVICE_CREDENTIALS to work we must not set cancel text (thats internal of Android).
Below is the screenshot from class BiometricPrompt
if you see the lines from KeychainModule,
Negative button text setting or not is already handled, so on react-native side if we just check the android version and accordingly pass or not would be better idea.
his rule means that a developer cannot provide a custom "cancel" or "use other method" button text if they have enabled the option to fall back to the system's built-in device PIN, pattern, or password authentication method within the same prompt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
authenticationTypewas not being respected on Android