Skip to content

Refactor handling of successful two-factor phone confirmation#8424

Merged
mitchellhenke merged 2 commits intomainfrom
mitchellhenke/otp-confirmation-context-cleanup
May 18, 2023
Merged

Refactor handling of successful two-factor phone confirmation#8424
mitchellhenke merged 2 commits intomainfrom
mitchellhenke/otp-confirmation-context-cleanup

Conversation

@mitchellhenke
Copy link
Contributor

🛠 Summary of changes

A small follow-up to #8347 to move some phone-specific functionality out of TwoFactorAuthenticationMethods. The path is a little bit circuitous with calling handle_valid_otp and a confirmation state in UserSessionContext, but the track_mfa_method_added method defined is only used when confirming a phone. The big clue is that the method name sounds general, but turns out to be specific to confirming a phone.

This PR pulls that method definition into the OtpVerificationController and calls it when confirming a phone.

changelog: Internal, Two-Factor Authentication, Refactor handling of successful two-factor phone confirmation
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

…troller.rb

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants