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

getGenericPassword does not require authentication if the phone's Keychain was recently unlocked from another biometric authentication event #593

Open
ShepSims opened this issue Apr 4, 2023 · 2 comments

Comments

@ShepSims
Copy link

ShepSims commented Apr 4, 2023

The opening screen of my application tries the following immediately upon launch or forgrounding

const result = await Keychain.getGenericPassword({
service: 'myapp',
authenticationPrompt: {
title: 'Biometric Sign In',
subtitle: 'Confirm biometrics to continue.',
},
});

This works perfectly in almost all cases, however, if my app is in the foreground when the user unlocks their phone, it appears that the biometric success is persisted for a few moments, and thus they are not prompted again for their biometrics to unlock the Keychain.

Wrapping the Keychain statement in a timeout that forces the app to wait 1 second before trying to get the item from storage as below does fix this issue, however, I don't believe this should be necessary.

setTimeout(async () => {
const result = await Keychain.getGenericPassword({
service: 'molo',
authenticationPrompt: {
title: 'Biometric Sign In',
subtitle: 'Confirm biometrics to continue.',
},
});
},1000}

This appears to be a fairly large security flaw, especially and I was wondering if anyone else had experienced it, or had any ideas as to why this is happening in the first place.

@hraschan
Copy link

hraschan commented May 2, 2023

Facing the same issue. Thats a really high risk problem which should get addressed soon.

@Abhisflyingsoon
Copy link

Experiencing same issue on Android!

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

No branches or pull requests

3 participants