Skip to content

feat(core): stage email/phone MFA records and bind existing identifiers - #10031

Open
wangsijie wants to merge 1 commit into
wangsijie-log-14720-schemas-core-emailsms-mfa-recordsfrom
wangsijie-stage-email-phone-mfa-records
Open

wangsijie wants to merge 1 commit into
wangsijie-log-14720-schemas-core-emailsms-mfa-recordsfrom
wangsijie-stage-email-phone-mfa-records

Conversation

@wangsijie

Copy link
Copy Markdown
Contributor

Summary

Part of LOG-14721, PR 2a of "MFA: Explicit email/SMS factor enrollment" (stacked on #10028).

  • Staged MFA slots & persistence: stage emailVerificationCode and phoneVerificationCode in Mfa interaction storage, include staged verification-code factors in interaction MFA resolution and trusted-device proof eligibility, persist EmailVerificationCode / PhoneVerificationCode records on submission, and deduplicate singleton factor records in mergeUserMfaVerifications.
  • Enrolling an existing identifier: update POST /api/experience/profile/mfa (addVerificationCodeByVerificationId) to validate that the factor is enabled in sign-in experience and allow enrolling the user's existing primary email (case-insensitive) or primary phone (normalized) from a verified code record without staging a duplicate profile update.

Testing

Unit tests

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

- Stage email and phone verification code MFA slots in interaction storage,
  include staged factors in MFA resolution and trusted-device eligibility,
  persist records on submit, and deduplicate singletons on merge.
- Validate enabled MFA factors and allow enrolling an existing primary email
  or phone in POST /api/experience/profile/mfa without rewriting profile.
@wangsijie
wangsijie force-pushed the wangsijie-stage-email-phone-mfa-records branch from 8d2c2d8 to f2cc711 Compare November 17, 2026 08:15
@github-actions github-actions Bot added size/xl and removed size/xl labels Nov 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants