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

Add ability to override the biometric prompt text client side #264

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

vahancouver
Copy link
Contributor

JIRA Ticket

SDKS-2990 - iOS - Expose Biometric Prompt to customize

Description

Add ability to override the biometric prompt text client side

During testing I discovered a bug: The prompt description was not properly set during device signing for BiometricAllowFallback type. The bug has been fixed as part of this feature.

Breakdown of changes for the feature

  1. Add public member-wise initializer for Prompt
  2. Add optional prompt parameter to DeviceBindingCallback.bind() method that overrides server values
  3. Add optional prompt parameter to DeviceSigningCallback.sign() method that overrides server values
  4. Add unit tests

Breakdown of the changes for bug fix

  1. Add optional reason string to CryptoKey.getSecureKey() method, then assign it to LAContext.localizedReason property
  2. Move prompt property from BiometricAuthenticator to it's parent class DefaultDeviceAuthenticator
  3. Set prompt.description as reason while calling CryptoKey.getSecureKey() from DefaultDeviceAuthenticator.sign()

Copy link
Contributor

@spetrov spetrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍🏻

Copy link
Contributor

@rodrigoareis rodrigoareis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good to me

@spetrov spetrov merged commit f7a3fd0 into develop Mar 7, 2024
7 checks passed
@spetrov spetrov deleted the SDKS-2990-device-binding-custom-prompt branch March 7, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants