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
Hello, I've come across an inconsistency in the error messages provided by react-native-keychain version 8.1.2 when a user cancels a biometry operation.
Steps to reproduce:
Prompt the user for biometric authentication using react-native-keychain.
On the biometric prompt, click "Cancel" or the equivalent option.
Expected Result:
A consistent error message for both iOS and Android.
Actual Result:
iOS: The error message is "User canceled the operation."
Android: The error message is "code: 13, msg: Cancel".
Possible Solutions:
It would be beneficial for the development community if there was consistency in the error messages across platforms. One of the following solutions could be considered:
Standardize the error message across both platforms.
Export the instance of the error in order to manipulate them more easily.
Additional Information:
React Native Version: 0.72.3
Device(s) Tested On: iPhone 13 / OnePlus6T
OS Version: iOS 16.1.1 / Android 11.1.2.2
The text was updated successfully, but these errors were encountered:
Yes this would be nice. There's also another case you need to handle where the user hit the back button on Android (there's no cancel button on the Samsung Knox implementation!). There might be more, but these are the ones we found on our array of test devices.
catch(e){conststringifiedError=JSON.stringify(e)if((e&&typeofe==='object'&&'code'ine&&String(e.code)==='-128')||// iOS cancelstringifiedError.includes('code: 13')||// android "log out" pressedstringifiedError.includes('code: 10')// android cancel via back button){// Handle cancel}
Hello, I've come across an inconsistency in the error messages provided by react-native-keychain version 8.1.2 when a user cancels a biometry operation.
Steps to reproduce:
Expected Result:
A consistent error message for both iOS and Android.
Actual Result:
iOS: The error message is "User canceled the operation."
Android: The error message is "code: 13, msg: Cancel".
Possible Solutions:
It would be beneficial for the development community if there was consistency in the error messages across platforms. One of the following solutions could be considered:
Standardize the error message across both platforms.
Export the instance of the error in order to manipulate them more easily.
Additional Information:
React Native Version: 0.72.3
Device(s) Tested On: iPhone 13 / OnePlus6T
OS Version: iOS 16.1.1 / Android 11.1.2.2
The text was updated successfully, but these errors were encountered: