Skip to content

feat(profile-sync-controller): add SRP tagging - #9741

Open
mathieuartu wants to merge 4 commits into
mainfrom
feat/tag-srp-login
Open

feat(profile-sync-controller): add SRP tagging#9741
mathieuartu wants to merge 4 commits into
mainfrom
feat/tag-srp-login

Conversation

@mathieuartu

@mathieuartu mathieuartu commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Explanation

References

Related to: https://consensyssoftware.atlassian.net/browse/MUL-2063

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Changes the SRP login signed message format and auth request payload; misalignment with the auth server or wrong identifier_type mapping could affect sign-in or analytics, though seedless lookup failures degrade to SRP.

Overview
Extends SRP profile login so /srp/login carries richer metadata: the signed raw_message becomes metamask:<nonce>:<pubkey>:primary|secondary (first HD entropy source vs any other), and the request body includes metametrics.identifier_type (SRP, GOOGLE, APPLE, or TELEGRAM).

AuthenticationController resolves the tag from the entropy source and maps the primary source’s social vault via SeedlessOnboardingController:getState (authConnection); secondary SRPs stay SRP, and missing/unavailable seedless state soft-fails to SRP. The SRP JWT bearer flow and authenticate() service accept optional getLoginTag / getLoginIdentifierType hooks (defaults: primary and SRP). Multi-SRP sign-in now signs two distinct messages instead of one.

Adds @metamask/seedless-onboarding-controller as a dependency and documents the change in the package changelog.

Reviewed by Cursor Bugbot for commit d2f6610. Bugbot is set up for automated code reviews on this repo. Configure here.

@mathieuartu mathieuartu self-assigned this Jul 31, 2026
@mathieuartu
mathieuartu requested review from a team as code owners July 31, 2026 14:33

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 940cd11. Configure here.

Comment thread packages/profile-sync-controller/CHANGELOG.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant