Skip to content

Got the DecryptionFailed error on Android with Touch ID #403

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

Open
billoneillighttiger opened this issue Mar 6, 2024 · 1 comment
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',
        });
Copy link

stale bot commented Apr 26, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the 🚧 stale label Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant