[MOD-2739] Identity: Authenticating multiple times on Android throws error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-09-10T18:08:02.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Identity |
Labels | n/a |
Reporter | Ewan Harris |
Assignee | Ewan Harris |
Created | 2020-08-19T13:19:38.000+0000 |
Updated | 2021-07-12T23:47:16.000+0000 |
Description
Description
When authenticating multiple times on Android the below error is thrown
{
error: 'Failed to encrypt the data with the generated key.',
success: false
}
Adding some further logging clarifies the error a little better
FingerPrintHelper: (pool-4-thread-1) [25314,25397] java.lang.IllegalStateException: IV has already been used. Reusing IV in encryption mode violates security best practices.
I applied the approach in https://github.com/appcelerator-modules/titanium-identity/pull/36 to the current module and that worked
Steps to reproduce
1. Build the module usingti build -p android
2. Click the Authenticate with: Touch ID
button and authenticate with your fingerprint
3. Click the Authenticate with: Touch ID
button and authenticate with your fingerprint
Actual
On the second attempt an error occursExpected
Should be able to auth everytimeComments
- Ewan Harris 2020-08-19 I will fix up the linked PR to remove the merge conflicts
- Ewan Harris 2020-08-19 PR: https://github.com/appcelerator-modules/titanium-identity/pull/59
- Lokesh Choudhary 2020-09-10 FR Passed. PR Merged.
- Lokesh Choudhary 2020-09-10 We would need a PR to add this to the SDK in the future
- Joshua Quick 2021-07-12 PR (titanium_mobile): https://github.com/appcelerator/titanium_mobile/pull/12951 _(To be included in Titanium SDK 10.0.1.)_