Skip to content

chore(auth): remove dead code related to /certificate/sign#20207

Merged
toufali merged 1 commit intomainfrom
remove-certificate-sign-ref
Mar 20, 2026
Merged

chore(auth): remove dead code related to /certificate/sign#20207
toufali merged 1 commit intomainfrom
remove-certificate-sign-ref

Conversation

@toufali
Copy link
Copy Markdown
Member

@toufali toufali commented Mar 17, 2026

Because

  • the certificate/sign enpoint was removed almost a year ago

This pull request

  • deletes obsolete associated code

Issue that this pull request solves

Closes: FXA-13290

@toufali toufali requested a review from a team as a code owner March 17, 2026 22:42
// For desktop, the 'service' parameter for this event gets
// special-cased to 'sync' so that it matches its pre-oauth
// `/certificate/sign` event.
// special-cased to 'sync' for historical continuity with the pre-oauth flow.
Copy link
Copy Markdown
Contributor

@LZoog LZoog Mar 18, 2026

Choose a reason for hiding this comment

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

Is this still true? Or maybe we need added context here? It's almost more confusing to me not to leave the certificate/sign comment there since historically that is what we were trying to match parity with (I think).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@LZoog maybe other team members have more context?

I just approached logically -- if service is special-cased to match a pre-oauth, /certificate/sign event -- and then we remove the /certificate/sign, service is still special cased for a historic pre-oauth flow, and certificate/sign is no longer relevant...

Happy to defer to you on suggested comment change or removing altogether!

Copy link
Copy Markdown
Contributor

@LZoog LZoog Mar 20, 2026

Choose a reason for hiding this comment

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

Maybe the original comment is also confusing to me. When we say "pre-oauth", since Desktop just moved to the oauth flow a year ago, that's what I think about, but if I look back through git history it must be referencing... mobile?? I'd have to go look again. I've also seen some other comments in our code about changing service to our client_id or vice versa, not sure.

Like, /certificate/sign is no longer relevant yes, but I imagine this pre-oauth flow is as well, I'm not sure if that's fx_ios_v1 context or what, but we always tell the user they have to upgrade Firefox before they can continue there, and so are we just still special casing because of metrics continuity or something? In which case, we can/should eventually move away from it?

Anyway, maybe we simply modify it to be // `/certificate/sign` event (which is deprecated)? I'll let you make the call 🙂 I guess either way we can remove CERTIFICATE_SIGN_DISABLE_ROLLOUT_RATE from webservices infra if that's still set over there.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated with a clearer comment in parentheses, preserving the original -- thanks!

Copilot AI review requested due to automatic review settings March 20, 2026 20:09
@toufali toufali force-pushed the remove-certificate-sign-ref branch from 153b76b to 9632c0b Compare March 20, 2026 20:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes lingering references to the long-gone /certificate/sign endpoint in the auth-server codebase (metrics/config), aligning the implementation with the endpoint’s removal and reducing dead configuration surface area.

Changes:

  • Removed /certificate/sign from the route-flow-event ignore list.
  • Deleted the obsolete certificateSignDisableRolloutRate convict config option.
  • Updated an inline comment referencing the historical /certificate/sign event mapping.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/fxa-auth-server/lib/routes/oauth/token.js Updates an inline comment around the legacy metrics mapping for old-sync flows.
packages/fxa-auth-server/lib/metrics/events.js Removes /certificate/sign from ignored route flow event paths.
packages/fxa-auth-server/config/index.ts Removes unused config option tied to certificate signing rollout disablement.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/fxa-auth-server/lib/routes/oauth/token.js Outdated
@toufali toufali force-pushed the remove-certificate-sign-ref branch from 9632c0b to 0234c13 Compare March 20, 2026 20:15
@toufali toufali merged commit 9e880f4 into main Mar 20, 2026
21 checks passed
@toufali toufali deleted the remove-certificate-sign-ref branch March 20, 2026 21:13
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.

4 participants