-
Notifications
You must be signed in to change notification settings - Fork 231
Open
Labels
Description
Got the DecryptionFailed error on Android SInfo.getItem with Touch ID. Didn't test on iOS.
"react-native-sensitive-info": "^6.0.0-alpha.9"
"react-native": "0.72.7"
"react": "18.2.0"
const savingAuthTokenWithTouchID = await SInfo.setItem(
'authTokenWithTouchID',
res.token,
{
sharedPreferencesName: 'mySharedPrefs',
keychainService: 'myKeychain',
touchId: true, //add this key
showModal: true, //add this key
kSecAccessControl: 'kSecAccessControlBiometryAny', // optional - Add support for FaceID
},
);
let protectedAuthToken = await SInfo.getItem('authTokenWithTouchID', {
sharedPreferencesName: 'mySharedPrefs',
keychainService: 'myKeychain',
touchID: true,
showModal: true, //required (Android) - Will prompt user's fingerprint on Android
strings: {
// optional (Android) - You can personalize your prompt
description: 'Custom Title ',
header: 'Custom Description',
},
// required (iOS) - A fallback string for iOS
kSecUseOperationPrompt:
'We need your permission to retrieve encrypted data',
});