fix: allow custom title and cancel button text for secure credentials#90
fix: allow custom title and cancel button text for secure credentials#90Vlodzimej wants to merge 2 commits into
Conversation
📝 WalkthroughWalkthroughThe PR extends the biometric authentication plugin's configuration interface to allow customization of authentication dialog labels. The ChangesCustomizable Auth UI Text Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Beta npm buildThis PR comes from a fork, so beta publish is disabled for security. If you need a beta package, move the branch into this repository first. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/definitions.ts`:
- Around line 165-166: SetCredentialOptions added two new public optional
properties (title and negativeButtonText) that lack JSDoc; add short JSDoc
comments above each property in the SetCredentialOptions interface describing
their purpose, expected type/format, and any default/behavior (e.g., title:
string shown on prompt; negativeButtonText: string label for cancel/negative
action) so docgen will include them in the API docs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: dd48cd8d-652d-417e-8093-fb5d738665ef
📒 Files selected for processing (2)
android/src/main/java/ee/forgr/biometric/NativeBiometric.javasrc/definitions.ts
ef843b0 to
c7d72fe
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@android/src/main/java/ee/forgr/biometric/NativeBiometric.java`:
- Around line 286-287: NativeBiometric.setCredentials currently forwards raw
strings from the PluginCall into the Intent extras ("title" and
"negativeButtonText") which can be empty/blank and cause AuthActivity's
BiometricPrompt.PromptInfo.Builder.build() to throw; update setCredentials to
normalize blank/whitespace-only values to the intended defaults before calling
intent.putExtra (e.g., treat "" or all-whitespace as null or use the default
strings "Protect Credentials"/"Cancel"), referencing
NativeBiometric.setCredentials, the "title"/"negativeButtonText" intent extras,
AuthActivity, and BiometricPrompt.PromptInfo.Builder.build to locate the code to
change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 20f88f02-7a44-4b35-a189-6aeadbb1e3e5
📒 Files selected for processing (2)
android/src/main/java/ee/forgr/biometric/NativeBiometric.javasrc/definitions.ts
Summary by CodeRabbit