-
Notifications
You must be signed in to change notification settings - Fork 12.2k
fix(totp): make TOTP field detectable by KeePassXC #37014
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
base: develop
Are you sure you want to change the base?
fix(totp): make TOTP field detectable by KeePassXC #37014
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
WalkthroughAdded autoComplete="one-time-code" to the TOTP authentication code TextInput in the 2FA security screen to support browser autofill for one-time codes. No other changes or API modifications. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (3)
apps/meteor/client/views/account/security/TwoFactorTOTP.tsx (3)
161-161
: Good fix: adds OTP autofill support.KeePassXC and modern browsers key off
autocomplete="one-time-code"
. Change looks correct.Consider mobile UX and avoiding mis-parsing leading zeros. Add numeric hints without switching to
type="number"
:-<TextInput id={totpCodeId} mie='8px' {...register('authCode')} autoComplete="one-time-code"/> +<TextInput + id={totpCodeId} + mie='8px' + {...register('authCode')} + autoComplete='one-time-code' + inputMode='numeric' + pattern='[0-9]*' + autoCapitalize='off' + autoCorrect='off' + spellCheck={false} +/>
161-161
: Minor: quote style consistency.Elsewhere props use single quotes; switch
"one-time-code"
to'one-time-code'
for consistency.
161-161
: Add autoComplete='one-time-code' to OTP inputsApply autoComplete="one-time-code" to the TextInput fields so platform OTP autofill works consistently:
- apps/meteor/client/components/TwoFactorModal/TwoFactorTotpModal.tsx — add autoComplete="one-time-code" to the TextInput.
- apps/meteor/client/components/TwoFactorModal/TwoFactorEmailModal.tsx — add autoComplete="one-time-code" to the TextInput.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
apps/meteor/client/views/account/security/TwoFactorTOTP.tsx
(1 hunks)
Currently, the TOTP input field is not recognized by KeePassXC due to missing autocomplete attribute and incorrect size.
Changes:
autocomplete="one-time-code"
to TOTP input field.size="1"
to allow detection by KeePassXC.This makes the field detectable by password managers that support TOTP.
Closes #30025
Summary by CodeRabbit