-
Notifications
You must be signed in to change notification settings - Fork 140
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
feat: implemented biometrics authentication for SecureCredentialsManager using androidx.biometrics package #745
Conversation
auth0/src/main/java/com/auth0/android/authentication/storage/LocalAuthenticationManager.kt
Fixed
Show fixed
Hide fixed
override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) { | ||
super.onAuthenticationSucceeded(result) | ||
resultCallback.onSuccess(true) | ||
} |
Check warning
Code scanning / CodeQL
Insecure local authentication Medium
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.
Please take not of all the breaking changes in each PR so that it can be collected together for the major release. We don't want to lose track of them
) : BaseCredentialsManager( | ||
authenticationClient, storage, jwtDecoder | ||
) { | ||
public abstract fun getCredentials(fragmentActivity: FragmentActivity, authenticationOptions: LocalAuthenticationOptions, callback: Callback<Credentials, CredentialsManagerException>) |
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.
If FragmentActivity is required in both method, can't we have this as a class level dependency, that way you can have same abstract method for both cred managers.
We just have to ensure there is no context leak by having fragment activity at a class level
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.
Agreed, updated the code accordingly, please take a look again.
auth0/src/main/java/com/auth0/android/authentication/storage/CredentialsManagerException.kt
Show resolved
Hide resolved
Signed-off-by: Sai Venkat Desu <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Sai Venkat Desu <[email protected]>
…t constructor instead of at each api level Signed-off-by: Sai Venkat Desu <[email protected]>
… authenticaton as well, in cases where customers just want to encode and encrypt the credentials Signed-off-by: Sai Venkat Desu <[email protected]>
Signed-off-by: Sai Venkat Desu <[email protected]>
…ons.Builder class Signed-off-by: Sai Venkat Desu <[email protected]>
…m multiple threads Signed-off-by: Sai Venkat Desu <[email protected]>
…e instances of SecureCredentialsManager Signed-off-by: Sai Venkat Desu <[email protected]>
Signed-off-by: Sai Venkat Desu <[email protected]>
Signed-off-by: Sai Venkat Desu <[email protected]>
Signed-off-by: Sai Venkat Desu <[email protected]>
Signed-off-by: Sai Venkat Desu <[email protected]>
Signed-off-by: Sai Venkat Desu <[email protected]>
Signed-off-by: Sai Venkat Desu <[email protected]>
7154e38
to
46d024b
Compare
@sgammon, we will be releasing it shortly. |
@desusai7 Awesome! Thank you so much, we're very excited! 😄 |
@sgammon, we've released it as part of version |
We are already using it! I haven't figured out how to use the new biometrics yet, but that is next on the list. I plan to check samples, test suites, etc., but if there is already documentation, please let me know 😄 |
documentation exists for it here |
Migrated to use BioMetricManager for performing Authentication before accessing credentials via SecureCredentialsManager
Breaking Changes:
requireAuthentication
API which used to be a pre-requisite previously for performing authentication while retrieving Credentials as it is no longer needed.Other changes:
androidx.biometrics
package to use theBiometricsManager
for authentication purposes.SecureCredentialsManager
to acceptfragmentActivity
&authenticationOptions
which are utilised while performing authentication usingBiometricPrompt
before retrieving credentials. It's no longer needed to callrequireAuthentication
before retrieving credentials.BiometricsManager
BiometricsManager
liketitle
,description
displayed within in the biometric prompt and the level of authentication required.CredentialsManagerException
to contain enumCode
describing the reason for exception and allowing users to check all the cases ofCredentialsManagerException
and handle accordinglyTesting
Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. Since this library has unit testing, tests should be added for new functionality and existing tests should complete without errors.
Checklist