Skip to content

Got the DecryptionFailed error on Android with Touch ID #403

@billoneillighttiger

Description

@billoneillighttiger

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',
        });

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions