react-native-keychain
react-native-keychain copied to clipboard
Why is accessControl.DEVICE_PASSCODE not supported on Android?
Hey guys,
I was wondering why the "DEVICE_PASSCODE" accessControl doesn't seem to be supported for Android devices? From the documentation, it seems that fingerprint
and none
are the only two authentication options by design. However, it seems like the "setUserAuthenticationParameters" keystore method lets you pass a type param which can be set to "AUTH_DEVICE_CREDENTIAL" requiring that the user input his password on key retrieval.
https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.Builder#setUserAuthenticationParameters(int,%20int)
Thanks, Daniel
This issue seems to be related, but it doesn't look like it was ever addressed by the devs.
@dafuga The API you refer to is only available in Android 11. Before that device credential cannot be used for crypto operations.
Thanks @sgal ! That's good to know! Are you guys still planning on adding it as an option for Android 11 devices?