Remove routes that have mfa variants, update routes to use verifiedSessionToken as needed
#19845
+199
−2,454
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.
Because
This pull request
Removes deprecated endpoints (replaced with /mfa variants):
POST /recovery_emailPOST /recovery_email/destroyPOST /recovery_email/set_primaryPOST /recovery_email/secondary/verify_codePOST /recovery_email/secondary/resend_codePOST /totp/destroyPOST /totp/replace/startPOST /totp/replace/confirmPOST /recovery_phone/changePOST /password/forgot/send_codePOST /password/forgot/resend_codeGET /password/forgot/statusUpdates auth strategies to
verifiedSessionToken:POST /totp/setup/verifyPOST /totp/setup/completePOST /recoveryKey/verifyPOST /password/createRemoves redundant session verification checks:
unverifiedAccount()andunverifiedSession()checks from handlers in totp.js, emails.js, recovery-key.js, and password.ts (now handled by auth strategies)Deletes corresponding tests for all removed endpoints and outdated verification checks
Issue that this pull request solves
Closes: https://mozilla-hub.atlassian.net/browse/FXA-12420
Checklist
Other information (Optional)
This is a breaking change for any clients still using the deprecated endpoints. All affected endpoints have /mfa variants that should be used instead. The inline setup flows (setup recovery key, setup TOTP) continue to use their non-/mfa endpoints as those are still needed.