Skip to content

feat(profile-sync-controller): add getCustomerServiceToken method and messenger action#9442

Open
mathieuartu wants to merge 2 commits into
mainfrom
feat/auth_cs_token
Open

feat(profile-sync-controller): add getCustomerServiceToken method and messenger action#9442
mathieuartu wants to merge 2 commits into
mainfrom
feat/auth_cs_token

Conversation

@mathieuartu

@mathieuartu mathieuartu commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Explanation

References

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

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
Introduces a new authenticated token exchange path used for customer-service identity; behavior aligns with existing auth helpers but any mishandling of returned tokens could affect support tooling access.

Overview
Adds getCustomerServiceToken on AuthenticationController and the AuthenticationController:getCustomerServiceToken messenger action so clients can obtain a short-lived token for Customer Service tooling.

The flow mirrors other bearer-token helpers: optional entropySourceId (defaults to primary SRP), wallet-unlock checks, and login via getAccessToken when needed. The SDK then POSTs /api/v2/customer-service/token with the OIDC access token in Authorization: Bearer, returning the response access_token.

The same API is exposed on JwtBearerAuth, SRP, and SIWE auth flows. Tests and nock/fixture mocks cover success, errors, rate limits, and locked-wallet cases.

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

@mathieuartu mathieuartu self-assigned this Jul 9, 2026
@mathieuartu mathieuartu requested a review from a team as a code owner July 9, 2026 08:26
@mathieuartu mathieuartu requested a review from a team as a code owner July 9, 2026 08:26
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