Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle primary SRP switch cases #5478

Merged
merged 2 commits into from
Mar 14, 2025

Conversation

mathieuartu
Copy link
Contributor

Explanation

We discovered that users leverage the "forgot password" flow to switch their primary SRPs in clients.
This is breaking auth & user storage, and this PR fixes that so that our controller can handle use cases where the primary SRP changes to another one.

Additional changes in clients should be made:

  • Signing out the user when submitting the forgot password form on extension

Please note that no changes in this PR introduces breaking changes.

References

Related to: https://consensyssoftware.atlassian.net/browse/IDENTITY-60

Changelog

@metamask/profile-sync-controller

  • REMOVED: AuthenticationController doesn't use the _snapPublicKeyCache anymore.
  • CHANGED: UserStorageController storageKeyCache can now hold multiple values.
  • CHANGED: SDK getStorageKey now takes a message argument for cache navigation purposes
  • CHANGED: SDK setStorageKey now takes an additional message argument to leverage cache usages

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 highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@mathieuartu mathieuartu added the team-identity Identity Team changes. https://github.com/orgs/MetaMask/teams/identity label Mar 14, 2025
@mathieuartu mathieuartu self-assigned this Mar 14, 2025
@mathieuartu mathieuartu marked this pull request as ready for review March 14, 2025 09:44
@mathieuartu mathieuartu requested a review from a team as a code owner March 14, 2025 09:44
@mathieuartu mathieuartu enabled auto-merge (squash) March 14, 2025 10:10
@mathieuartu mathieuartu merged commit 56a3582 into main Mar 14, 2025
139 checks passed
@mathieuartu mathieuartu deleted the feat/handle-primary-srp-switching branch March 14, 2025 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-identity Identity Team changes. https://github.com/orgs/MetaMask/teams/identity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants