Skip to content

cleanup(2fa): Remove feature flags and associated old 2FA flows#19433

Merged
vpomerleau merged 1 commit intomainfrom
FXA-12183
Sep 15, 2025
Merged

cleanup(2fa): Remove feature flags and associated old 2FA flows#19433
vpomerleau merged 1 commit intomainfrom
FXA-12183

Conversation

@vpomerleau
Copy link
Copy Markdown
Contributor

@vpomerleau vpomerleau commented Sep 10, 2025

Because

  • The updated flows are fully rolled out in production
  • The totp/create endpoint is no longer responsible for creating recovery codes

This pull request

  • Remove updated2faSetupFlow, updatedInlineTotpSetupFlow, updatedInlineRecoverySetupFlow flags
  • Remove code from endpoint that optionally generated and returned recovery codes
  • Remove skipRecoveryCodes option
  • Remove old components
  • Remove tests for old flows
  • Remove conditional logic around flows

Issue that this pull request solves

Closes: FXA-12813

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

@vpomerleau vpomerleau force-pushed the FXA-12183 branch 4 times, most recently from fae1bbe to f732415 Compare September 11, 2025 21:18
@vpomerleau vpomerleau marked this pull request as ready for review September 11, 2025 21:43
@vpomerleau vpomerleau requested review from a team as code owners September 11, 2025 21:43
@dschom dschom self-requested a review September 12, 2025 00:26
);
assert.notDeepEqual(
result,
result.recoveryCodes,
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.

Was this a bug in the original test? I'm always little leery of notEqual, cause it is easy to get a false positive.

return this.api.replaceRecoveryCodes(this.sessionToken, options);
};

Client.prototype.updateRecoveryCodes = function (codes) {
Copy link
Copy Markdown
Contributor

@dschom dschom Sep 12, 2025

Choose a reason for hiding this comment

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

Just curious, how are update and set functionally different?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

set can be used on initial 2FA setup (to add recovery codes before marking 2FA as enabled), compared to update which requires 2fa to already be enabled.

default: false,
doc: 'Enables a redesign of the 2fa setup flow from settings with recovery phone option',
format: Boolean,
env: 'FEATURE_FLAGS_UPDATED_INLINE_RECOVERY_SETUP_FLOW',
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.

Just a reminder to clean up webinfra too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep, I've added a note in the deploy doc already. :)

Copy link
Copy Markdown
Contributor

@dschom dschom left a comment

Choose a reason for hiding this comment

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

Gave it a couple drive bys. Nice clean up!

Because:

* The updated flows are fully rolled out in production
* The totp/create endpoint is no longer responsible for creating recovery codes

This commit:

* Remove updated2faSetupFlow, updatedInlineTotpSetupFlow, updatedInlineRecoverySetupFlow flags
* Remove code from endpoint that optionally generated and returned recovery codes
* Remove skipRecoveryCodes option
* Remove old components
* Remove tests for old flows
* Remove conditional logic around flows

Closes #FXA-12813
@vpomerleau vpomerleau merged commit 867abab into main Sep 15, 2025
20 checks passed
@vpomerleau vpomerleau deleted the FXA-12183 branch September 15, 2025 18:17
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.

3 participants