fix(ui): add autocomplete attribute to 2FA input fields#39277
fix(ui): add autocomplete attribute to 2FA input fields#39277Aerospace-prog wants to merge 2 commits intoRocketChat:developfrom
Conversation
This adds the autocomplete='one-time-code' attribute to the TwoFactorTotpModal and TwoFactorEmailModal inputs, allowing password managers like KeePassXC to correctly auto-fill the 2FA code. Fixes RocketChat#30025
|
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 |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🔇 Additional comments (2)
WalkthroughAdds the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
|
|
Description
This PR addresses Issue #30025 where password managers (like KeePassXC, 1Password, Bitwarden) were unable to automatically detect and fill the 2FA code input fields on the authentication modals.
By adding the standard HTML attribute
autoComplete="one-time-code"to the underlying<TextInput>components, password managers and browser autofill features can now successfully identify and populate the TOTP and Email 2FA fields, significantly improving the UX and accessibility during login.I applied this fix to both the TOTP Modal and the Email 2FA Modal to ensure consistency across the application's security flows.
Related Issues
Fixes #30025
Areas of Code Affected
Testing Done
yarn eslint).<input>element renders with the correct DOM attributes.Summary by CodeRabbit