Extract mixin for common MFA deletion behaviors#11796
Merged
Conversation
f1de60b to
d79f40f
Compare
changelog: Internal, Code Quality, Extract mixin for common MFA deletion behaviors
d79f40f to
15f7bf7
Compare
Contributor
Author
zachmargolis
approved these changes
Jan 28, 2025
Contributor
Author
Ticket: LG-15602 |
n1zyy
pushed a commit
that referenced
this pull request
Jan 31, 2025
changelog: Internal, Code Quality, Extract mixin for common MFA deletion behaviors
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.
🎫 Ticket
Related to LG-14052
🛠 Summary of changes
Refactors to create a new
MfaDeletionConcern#handle_successful_mfa_deletionmethod. This builds upon #11795, where the method was initially introduced to handle "Undo" behaviors associated with a mismatched WebAuthn configuration.Deleting a multi-factor authentication method always incurs the following:
Previously, these were duplicated across controllers for each method, which creates risk of human error for failing to account for one or more of these actions.
As an example, refactoring this behavior reveals that we don't have a user event associated with deleting backup codes, which became obvious when abstracting this method with a required
event_typekeyword argument. This will be addressed in a follow-up ticket.📜 Testing Plan
Verify no regressions of impacted behavior, and that existing test coverage passes.