Auth0.Android icon indicating copy to clipboard operation
Auth0.Android copied to clipboard

feat: implemented biometrics authentication for SecureCredentialsManager using androidx.biometrics package

Open desusai7 opened this issue 1 year ago • 0 comments

Migrated to use BioMetricManager for performing Authentication before accessing credentials via SecureCredentialsManager

Breaking Changes:

  • Removed the requireAuthentication API which used to be a pre-requisite previously for performing authentication while retrieving Credentials as it is no longer needed.

New API:

  • Added a new API getCredentialsWithAuthentication in SecureCredentialsManager which is responsible for performing authentication before retrieving credentials. It's no longer needed to call requireAuthentication before retrieving credentials.

Other changes:

  • We've added a dependency on androidx.biometrics package to use the BiometricsManager for authentication purposes.
  • Added class LocalAuthenticationManager which consolidates all the logic for interacting with the BiometricsManager
  • Added class LocalAuthenticationOptions which helps to configure the behaviour of the BiometricsManager like title, description displayed within in the biometric prompt and the level of authentication required.
  • Updated CredentialsManagerException to contain enum Code describing the reason for exception and allowing users to check all the cases of CredentialsManagerException and handle accordingly

Testing

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.

  • [ ] This change adds unit test coverage
  • [ ] This change adds integration test coverage
  • [ ] This change has been tested on the latest version of the platform/language or why not

Checklist

desusai7 avatar Jun 10 '24 13:06 desusai7