[MOD-2489] iOS: Passcode Authentication feature on ti.identity module
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2020-04-06T16:22:31.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Identity |
Labels | 2020-Q2, authorization, faceid, ios, module, passcode, touchid |
Reporter | Fazlul Haque |
Assignee | Vikas Goyal |
Created | 2019-01-18T18:42:44.000+0000 |
Updated | 2020-04-06T16:22:31.000+0000 |
Description
Hello,
One of our customer would like to use iPhone's Passcode option on the app. He tried ti.identity module which works fine for Touch ID & Face ID. Along with this he wants to use the Passcode Authentication for the App. Which is not possible to current ti.identity.
Thanks
I'm pretty sure iOS already supports passcodes via the module's
AUTHENTICATION_POLICY_PASSCODE
constant, which tells the system to fallback to a passcode if touch id or face id isn't available on the device. In our module's example code, the above mentioned constant is commented out. Add it in and it should work. https://github.com/appcelerator-modules/titanium-identity/blob/3e0d849bf6e157df60b48efd272857fa4c3e8b4f/ios/example/app.js#L33I have checked this issue on device and [~jquick] is right we can use AUTHENTICATION_POLICY_PASSCODE constant to set passcode as fallback if biometric scan is failed or not set. if user set AUTHENTICATION_POLICY_PASSCODE in javascript then in native code it uses LAPolicyDeviceOwnerAuthentication policy. Please check https://developer.apple.com/documentation/localauthentication/lapolicy/lapolicydeviceownerauthentication?language=objc for more understanding cc: [~ssingh],[~amukherjee]
Closing it as "Invalid" since we already support this feature on iOS.