Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got the DecryptionFailed error on Android with Touch ID #403

Open
billoneillighttiger opened this issue Mar 6, 2024 · 0 comments
Open

Comments

@billoneillighttiger
Copy link

billoneillighttiger commented Mar 6, 2024

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',
        });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant