Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix allowDeviceAuthentication failing on Android 31 and later #225

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jayfunk
Copy link
Member

@jayfunk jayfunk commented Oct 19, 2022

These changes are to attempt to address the issue outlined in #181. I was able to address the root issue where the android.security.KeyStoreException: Key user not authenticated is reported when attempting to sign with the private key. It appears from this documentation that when using BiometricPrompt.authenticate we must use the form of the method that does not take CryptoObject as that implies the prompt will be used for Biometric authentication only (supporting documentation https://developer.android.com/training/sign-in/biometric-auth#biometric-or-lock-screen).

After updating the implementation to not use the CryptoObject form of BiometricPrompt.authenticate. After enabling this new form of authentication for both Biometric and device authentication I did find that I was no longer able to verify the signature with my test backend. I was not able to resolve this issue and was hoping that someone else might take a look at my changes and be able to see what change may have caused this regression.

non-biometric authentication. There is an issue in newer versions of
Android that require different configuration of the biometrics library
for dual auth flows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants