fix(web): MFA status detection false positive + auth architecture docs#205
Merged
Conversation
- Change totalFactors threshold from >= 2 to > 2 - Every account starts with 2 default factors (JWT verifier + hashedShare) - MFA now correctly shows DISABLED for fresh accounts - Update JSDoc comment explaining the threshold reasoning Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 8f7f303fdcd2
Tasks completed: 1/1 - Fix MFA status threshold check and update comment SUMMARY: .planning/quick/022-fix-mfa-status-detection-false-positive/022-SUMMARY.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 9a543d13476b
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: e2779b1c1b44
Entire-Checkpoint: 2812ad9160af
Area: auth Entire-Checkpoint: e672eaa58cd6
Covers MPC Core Kit key hierarchy, custom verifier flow, factor lifecycle (pre/post MFA), security analysis of semi-custodial vs non-custodial trust models, and cross-device approval protocol. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 0381e2ce7b39
WalkthroughThis PR fixes an MFA status detection false positive by adjusting the enabled threshold from ≥2 to >2 factors in useMfa.ts, eliminating incorrect MFA enabled status on fresh accounts. It includes planning documents for the fix and a new proposal for alternative MFA factor types, plus comprehensive authentication architecture documentation. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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 |
7 tasks
FSM1
added a commit
that referenced
this pull request
Feb 27, 2026
Verify and close two active debug sessions after confirming all issues are fixed on main with commit/PR cross-references. corekit-auth-uat: 4 issues resolved (ISSUE-001 tab crash, ISSUE-003 JWKS persistence, ISSUE-004 SecurityTab wiring, ISSUE-002 documented). Added post-session follow-up fixes (#205, #210, #213) and E2E coverage mapping for 19 previously-skipped UAT test cases. mfa-banner-footer-overlap: grid-area fix (#143) and z-index follow-up verified on main with file/line references. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: b1ae6e4f2098
2 tasks
FSM1
added a commit
that referenced
this pull request
Feb 27, 2026
Verify and close two active debug sessions after confirming all issues are fixed on main with commit/PR cross-references. corekit-auth-uat: 4 issues resolved (ISSUE-001 tab crash, ISSUE-003 JWKS persistence, ISSUE-004 SecurityTab wiring, ISSUE-002 documented). Added post-session follow-up fixes (#205, #210, #213) and E2E coverage mapping for 19 previously-skipped UAT test cases. mfa-banner-footer-overlap: grid-area fix (#143) and z-index follow-up verified on main with file/line references. Entire-Checkpoint: b1ae6e4f2098 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Closed
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
details.totalFactors >= 2todetails.totalFactors > 2inuseMfa.ts. Every Web3Auth MPC Core Kit account starts with 2 default factors (JWT verifier share + hashedShare cloud custodial key), so the old check was always true — falsely showing MFA as [ENABLED] for every user. AfterenableMFA()deletes the hashedShare and creates device + recovery factors,totalFactorsbecomes 3+.docs/AUTHENTICATION_ARCHITECTURE.mdcovering the MPC Core Kit key hierarchy, custom verifier flow, factor lifecycle (pre/post MFA), security analysis of semi-custodial vs non-custodial trust models, cross-device approval protocol, and MFA status detection logic.Test plan
[DISABLED]status badge on Security tabenableMFA()shows[ENABLED]status badgepnpm --filter web exec tsc --noEmitdocs/AUTHENTICATION_ARCHITECTURE.mdfor accuracy🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Documentation