Skip to content

feat(android): add confirmationRequired option to authenticationPrompt #755

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

quangsuong
Copy link

@quangsuong quangsuong commented May 16, 2025

🔥 Feature: Add confirmationRequired Option to Android Authentication Prompt

✨ Summary

This PR introduces a new optional field confirmationRequired in the authenticationPrompt config for Android. It allows developers to control whether the user must press an explicit confirmation (OK) button after biometric authentication.

By default, confirmationRequired is now set to false, enabling a faster, more seamless biometric UX unless explicitly overridden.


✅ Changes

Android Native:

  • KeychainModule.kt:
    • Reads confirmationRequired from authenticationPrompt.
    • Applies it to PromptInfo.Builder.setConfirmationRequired(...).
    • Default is now false (user does not need to confirm after authentication unless specified).

TypeScript Types:

  • Extended AuthenticationPrompt type to support:
confirmationRequired?: boolean;

@herbig
Copy link

herbig commented May 16, 2025

If you default this to true it will change the behavior of existing apps who upgrade to the latest version.

@quangsuong quangsuong force-pushed the feature/android-auth-confirmation-required branch from 487ae2c to a635a21 Compare May 16, 2025 15:10
@quangsuong
Copy link
Author

If you default this to true it will change the behavior of existing apps who upgrade to the latest version.

Thanks for the feedback! 🙌 I confused it with the default behavior in a project I’m currently working on. You’re absolutely right — I’ve updated the code to restore the default to false. Appreciate the heads-up!

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

Successfully merging this pull request may close these issues.

2 participants