-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[secure-store] Add canUseBiometricAuthentication
function
#26767
Merged
behenate
merged 5 commits into
main
from
@behenate/secure-store-add-can-require-authentication
Jan 31, 2024
Merged
[secure-store] Add canUseBiometricAuthentication
function
#26767
behenate
merged 5 commits into
main
from
@behenate/secure-store-add-can-require-authentication
Jan 31, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lukmccall
approved these changes
Jan 29, 2024
packages/expo-secure-store/android/src/main/java/expo/modules/securestore/SecureStoreModule.kt
Outdated
Show resolved
Hide resolved
expo-bot
added
bot: passed checks
ExpoBot has nothing to complain about
and removed
bot: suggestions
ExpoBot has some suggestions
labels
Jan 29, 2024
amandeepmittal
approved these changes
Jan 30, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm 馃憤
Left a minor suggestion.
tsapeta
approved these changes
Jan 30, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we could use the new function in NCL example and test-suite
behenate
deleted the
@behenate/secure-store-add-can-require-authentication
branch
January 31, 2024 13:33
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bot: fingerprint changed
bot: passed checks
ExpoBot has nothing to complain about
published
Changes from the PR have been published to npm
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
fixes #26777
Secure-store will throw an error when trying to save a value with
requireAuthentication
set totrue
but no biometrics (or insufficient biometrics) are enrolled. This is good, but it's the only way (without usingexpo-local-authentication
) of checking if the value can be saved. This is not ideal.This PR adds a small convenience function that allows our users to check if
requireAuthentication
can be used before saving the value.Any suggestions for a better name for the method are appreciated! 馃槃
How
On Android used existing assertion function, handled the exception by returning
false
if it occurred, otherwisetrue
. On iOS usedLAContext
to check currently enrolled biometrics.Test Plan
Tested in BareExpo on iOS 16 and Android 13 devices.