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

When using loadBiometricSecret instead of secreat getting 'biometric_success' when using Pin (Android) #378

Open
Kawinesh opened this issue Oct 28, 2021 · 2 comments

Comments

@Kawinesh
Copy link

Kawinesh commented Oct 28, 2021

Bug report

Description

I am using the backupJSONObjectToStorage function to store my secret and when i try to get the secret using loadBiometricSecret function and trying to use Pin instead of Fingerprint i am getting 'biometric_success' in the success callback of loadBiometricSecret instead of the secret.

Expected would be get the secret in the success callback.

Plugin version: 4.0.2
Cordova : 9.0.0
Cordova Android : ^9.0.0
Device: One Plus 7 (Android 11)

@MatiasProietti
Copy link

I can confirm this bug happens to me as well.

Plugin: ^5.0.0
Capacitor: ^3.3.2
Device: Samsung A32 (Android 11)

@jdpsah93
Copy link

jdpsah93 commented Oct 5, 2023

I am also facing the same issue @Kawinesh . loadBiometricSecret and registerBiometricSecret is not working properly with PIN authentication. I think we should not give option to use PIN to perform any operation with these two methods. I suspect setting and getting secret from keyChain works only with biometric(fingerprint/touchId) authentication. However we can allow to use PIN if user just calls show method as it just authenticates identity and it doesn't deal with any secret operation.

If we add the below highlighted line in If condition then it will stop giving option to use pin If the operation is apart from justAuthenticate

@NiklasMerz please let me know if this solution is fine then I will raise the PR for this change.

NOTE: after doing this changes I have tested and I am able to achieve as expected.

PIN issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants