Skip to content

♻️ Refactor duplicate views for mfa settings - #2076

Open
rebeccadumazert wants to merge 1 commit into
mainfrom
refactor-duplicate-view
Open

♻️ Refactor duplicate views for mfa settings#2076
rebeccadumazert wants to merge 1 commit into
mainfrom
refactor-duplicate-view

Conversation

@rebeccadumazert

@rebeccadumazert rebeccadumazert commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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).

@rebeccadumazert
rebeccadumazert force-pushed the refactor-duplicate-view branch 2 times, most recently from 8e2ad22 to f649653 Compare August 11, 2026 22:08
@rebeccadumazert
rebeccadumazert marked this pull request as draft August 11, 2026 22:58
@rebeccadumazert

Copy link
Copy Markdown
Contributor Author

@rebeccadumazert
rebeccadumazert force-pushed the refactor-duplicate-view branch from f649653 to fe23bbd Compare August 12, 2026 13:04
@rebeccadumazert
rebeccadumazert force-pushed the refactor-duplicate-view branch from fe23bbd to 1dca2f3 Compare August 12, 2026 13:38
@rebeccadumazert
rebeccadumazert marked this pull request as ready for review August 12, 2026 14:00

@BenoitSerrano BenoitSerrano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so much cleaner!
I'd rather have an absolute path though for the totpRecommandationPath, it would be more dependable

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants