Repository navigation
Conversation
lovromazgon
reviewed
Dec 1, 2026
Comment on lines
1233
to
+1234
| // A verified phone factor does not count while phone verification is disabled, | ||
| // so the TOTP factor is still the last usable second factor. | ||
| // so the TOTP factor is still the last usable second factor and takes the codes with it. |
Contributor
There was a problem hiding this comment.
Hmm, wouldn't that mean the user becomes stuck in aal1 and can't enroll a new MFA factor without intervention? Auth counts the verified phone as a factor, but since phone verification is disabled and recovery codes were removed together with TOTP, they can't get to aal2 to enroll a new factor.
lovromazgon
reviewed
Dec 1, 2026
lovromazgon
reviewed
Dec 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.
Unenrolling a user's last usable second factor now removes their recovery codes in the same transaction instead of failing with
mfa_recovery_codes_sole_factor. Previously a user who signed in with a recovery code had to delete the codes first, which downgraded their session to AAL1 and left them unable to remove the factor they had lost.DELETE /factors/{factorId}deletes the recovery-code factor, audits it and downgrades its sessions when no other usable second factor remainsDELETE /factors/recovery-codesis kept for existing clients and marked deprecated in the OpenAPI spec