[MOD-2588] Android: Add fallback support to password, pin, or touch-pattern in "ti.identity"
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-07-27T17:52:10.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.1.0 |
Components | Identity |
Labels | 2020-Q3, android, module, passcode, password, ti.identity |
Reporter | Joshua Quick |
Assignee | Akansha Maheshwari |
Created | 2020-03-18T16:42:09.000+0000 |
Updated | 2020-07-27T17:52:10.000+0000 |
Description
*Summary:*
The "ti.identity" module for Android should fallback to using the device's password, pin, or touch-pattern if a biometric means of identification (ie: touch id or face id) is not available.
*To-Do:*
When setting up the Java
BiometricPrompt.PromptInfo.Builder
, we should call the setDeviceCredentialAllowed()
and to true
to enable fallback support... but only
https://developer.android.com/training/sign-in/biometric-auth#allow-fallback
We should only set it to true
if the module's AUTHENTICATION_POLICY_PASSCODE
is set. This is for parity with iOS.
Currently, we prompt in the following 2 places in the code...
[FingerPrintHelper.java#L127](https://github.com/appcelerator-modules/titanium-identity/blob/3e0d849bf6e157df60b48efd272857fa4c3e8b4f/android/src/ti/identity/FingerPrintHelper.java#L127)
[KeychainItemProxy.java#L159](https://github.com/appcelerator-modules/titanium-identity/blob/3e0d849bf6e157df60b48efd272857fa4c3e8b4f/android/src/ti/identity/KeychainItemProxy.java#L159)
https://github.com/appcelerator-modules/titanium-identity/pull/52 In this, i add the fallback for the device's when the biometric means of identification is not available in the Module's TiIdentity.authenticate method.
[~jquick], This will need a module ver update to 3.0.2 in the SDK repo as well as this is included with the SDK.
merged PR including it in SDK to master. Cherry-picked to 9_1_X and 9_3_X branches.
Verified module have been added to SDK branches. Closing.