Repository navigation
fix(mfa): ask for a new code after too many wrong ones - #47647
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
✨ Files requiring CODEOWNER review ✨🔑 @MetaMask/accounts-engineers (4 files, +59 -2)
|
Builds ready [9617f6e]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 3 warn · 🔴 2 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [dc3b04b]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 2 warn · 🔴 4 fail)
Bundle Size Diffs
|
|
|
No release label on PR. Adding release label release-13.57.0 on PR, as PR was added to branch 13.57.0 when release was cut. |



Description
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes email MFA error recovery and analytics in the auth flow, though scope is narrow and covered by new tests.
Overview
After too many wrong email OTP codes, the flow no longer auto-sends a replacement when recovery runs. Users stay on the OTP step with the too many attempts error and must tap Get new code once the existing resend cooldown ends, avoiding silent sends that the server may reject.
The OTP step UI now shows a Get new code in Xs countdown during that cooldown (new
mfaOtpGetNewCodeIncopy) and refreshes the too many attempts message. MFA Code Resent analytics are skipped when the flow has already ended (including mid-send), and tests cover the new behavior end-to-end.Reviewed by Cursor Bugbot for commit 9617f6e. Bugbot is set up for automated code reviews on this repo. Configure here.