Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2739] Identity: Authenticating multiple times on Android throws error

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2020-09-10T18:08:02.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsIdentity
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2020-08-19T13:19:38.000+0000
Updated2021-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 using ti 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 occurs

Expected

Should be able to auth everytime

Comments

  1. Ewan Harris 2020-08-19

    I will fix up the linked PR to remove the merge conflicts
  2. Ewan Harris 2020-08-19

    PR: https://github.com/appcelerator-modules/titanium-identity/pull/59
  3. Lokesh Choudhary 2020-09-10

    FR Passed. PR Merged.
  4. Lokesh Choudhary 2020-09-10

    We would need a PR to add this to the SDK in the future
  5. 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.)_

JSON Source