♻️ Refactor duplicate views for mfa settings - #2076
Open
rebeccadumazert wants to merge 1 commit into
Open
Conversation
rebeccadumazert
force-pushed
the
refactor-duplicate-view
branch
2 times, most recently
from
August 11, 2026 22:08
8e2ad22 to
f649653
Compare
rebeccadumazert
marked this pull request as draft
August 11, 2026 22:58
Contributor
Author
rebeccadumazert
force-pushed
the
refactor-duplicate-view
branch
from
August 12, 2026 13:04
f649653 to
fe23bbd
Compare
rebeccadumazert
force-pushed
the
refactor-duplicate-view
branch
from
August 12, 2026 13:38
fe23bbd to
1dca2f3
Compare
rebeccadumazert
marked this pull request as ready for review
August 12, 2026 14:00
BenoitSerrano
left a comment
Contributor
There was a problem hiding this comment.
This is so much cleaner!
I'd rather have an absolute path though for the totpRecommandationPath, it would be more dependable
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.
Problem:
The MFA decision helper and its surrounding pages (double-authentication-choice, is-totp-app-installed, totp-configuration) were fully duplicated between the login flow (/users/...) and the account settings flow (/...), making maintenance harder and letting the two drift apart — e.g. totp-tool-type wasn't relayed on invalid TOTP code in the account flow.
Fix:
Extracted shared markup into parameterized layouts under src/views/mfa-settings/. Each view now includes its layout with context-specific params (URLs, csrfToken, notifications). Also fixed the missing totp-tool-type relay in postTotpConfigurationController (user flow).