Skip to content

fix(auth): Pass correct client/service name to mailer#20049

Merged
nshirley merged 1 commit intomainfrom
FXA-13055
Feb 12, 2026
Merged

fix(auth): Pass correct client/service name to mailer#20049
nshirley merged 1 commit intomainfrom
FXA-13055

Conversation

@nshirley
Copy link
Contributor

@nshirley nshirley commented Feb 12, 2026

Because:

  • The old mailer would internally call to oauth_info_service

This Commit:

  • Fixes a few places that were missed to call oauth_info_service and pass the correct clientName to the templates
  • verifyLogin, and verifyLoginCode email templates are fixed

Closes: FXA-13055

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

image

Other information (Optional)

Any other information that is important to this pull request.

@nshirley nshirley requested a review from a team as a code owner February 12, 2026 15:58
@nshirley nshirley force-pushed the FXA-13055 branch 2 times, most recently from 540f666 to 7e60ff1 Compare February 12, 2026 17:40
},
code: 'tokenVerifyCode',
clientName: 'Firefox',
clientName: 'sync',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

wanted to explicitly call this one out - the old way would pass the service to the mailer, which would internally call to oauth_client_info.

However, we're now mocking the oauth_client_info at this level and it by default always returns { name: 'sync' } so that's why this changed.

sessionToken.tokenVerificationId = 'tokenVerifyCode';
sessionToken.mustVerify = true;
mocks.mockOAuthClientInfo({
fetch: sinon.stub().resolves({ name: 'mockOauthClientName' }),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just a unique serviceName to implicitly check that we're calling the mockOAuthClient here

function mockOAuthClientInfo(overrides) {
const mock = {
fetch: sinon.stub().resolves('sync'),
fetch: sinon.stub().resolves({ name: 'sync' }),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was missed initially, but the fetch call resolves with this object, not just a raw string value

Because:
 - The old mailer would internally call to oauth_info_service

This Commit:
 - Fixes a few places that were missed to call oauth_info_service and
   pass the correct clientName to the templates
 - verifyLogin, and verifyLoginCode email templates are fixed

Closes: FXA-13055
Copy link
Contributor

@dschom dschom left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

@nshirley nshirley merged commit 5a9813b into main Feb 12, 2026
21 checks passed
@nshirley nshirley deleted the FXA-13055 branch February 12, 2026 23:29
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.

2 participants