Repository navigation
feat(profile-sync-controller)!: open verification session on enrollment and let server manage tokens TTL - #10653
Merged
Merged
Conversation
…t and let server manage tokens TTL
ccharly
previously approved these changes
Oct 1, 2026
mathieuartu
enabled auto-merge
October 1, 2026 14:57
mathieuartu
force-pushed
the
feat/mfa-enroll-verification-session
branch
from
October 1, 2026 15:01
01d3c64 to
17a5de6
Compare
ccharly
approved these changes
Oct 1, 2026
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.
Explanation
References
Related to: https://consensyssoftware.atlassian.net/browse/MUL-2320
Checklist
Note
Medium Risk
Breaking exports and MFA session semantics affect authentication flows; changes are localized to profile-sync-controller with broad test coverage, but altered session duration and enroll→verify behavior need careful client integration.
Overview
Aligns MFA enrollment and verification session handling with the updated
POST /api/v2/mfa/enroll/completeAPI, which now returns an assertion like verify-complete instead of{ status: 'enrolled' }.completeCredentialEnrollmentexchanges that assertion for a verification token and opens a session for the newly enrolled credential (replacing any prior session), so callers usually skip a separate verify step after enroll. Enrollment still succeeds if the token exchange fails; the previous session is kept.completeMfaEnrollmentin the SDK now returnsMfaVerificationAssertion(breaking for direct SDK callers).Verification session lifetime no longer uses the removed
VERIFICATION_SESSION_TTL_MS(15-minute cap) or JWTexpat open time. Sessions run for the server’sexpires_in, measured fromobtainedAton the device clock, with stricter validation whenexpires_inis missing or invalid. Shared helper#openVerificationSessionFromAssertionpowers both verify- and enroll-complete paths.Docs and JSDoc note that
getVerificationTokenis low-level and UI flows should preferverifyOrEnroll.Reviewed by Cursor Bugbot for commit 17a5de6. Bugbot is set up for automated code reviews on this repo. Configure here.