Repository navigation
fix(mfa): keep email enrollment errors on the email screen - #38061
Conversation
A failed enroll was opening the code screen and saying a code had been sent. Co-authored-by: Cursor <cursoragent@cursor.com>
|
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. |
Smart E2E Test SelectionAI Confidence: 90 E2E reasoningExpand to readThis PR contains:
The MFA flow is part of the identity/seedless onboarding system, but:
Given the narrow scope of the fix (MFA email enrollment error handling) and the fact that no existing E2E smoke tests cover this specific flow, running zero E2E tags is appropriate. The changes are validated by the new unit and component tests added in this PR. Performance reasoningExpand to readNo performance-sensitive code paths are modified. The changes are limited to MFA flow error handling logic and test additions. No rendering, state management, asset loading, or app launch paths are affected. |
|



Description
Continue on the email verification screen was opening the code screen before
POST /api/v2/mfa/enrollfinished. When that call failed, the code screen said a code had been sent and offered "Resend code".The email screen now stays up until a code is actually sent. A failed enrollment shows "Something went wrong. Try again." under the email field, the same error treatment the code screen uses. The address the user typed stays in the field.
Changelog
CHANGELOG entry: Fixed a failed email enrollment opening the code screen before a code was sent
Related issues
Refs: TRAM-4180
Manual testing steps
Screenshots/Recordings
Before
tram-4180-before.mp4
After
Screen.Recording.iPhone.17.Pro.10-22-2026.at.12.45.26.PM.mp4
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Made with Cursor
Note
Medium Risk
Changes MFA enrollment step ordering and error surfacing in a user-facing auth flow; scope is narrow but incorrect handling could block or mislead users during email setup.
Reviewed by Cursor Bugbot for commit f1c21c9. Bugbot is set up for automated code reviews on this repo. Configure here.