Conversation
540f666 to
7e60ff1
Compare
nshirley
commented
Feb 12, 2026
| }, | ||
| code: 'tokenVerifyCode', | ||
| clientName: 'Firefox', | ||
| clientName: 'sync', |
Contributor
Author
There was a problem hiding this comment.
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.
nshirley
commented
Feb 12, 2026
nshirley
commented
Feb 12, 2026
| sessionToken.tokenVerificationId = 'tokenVerifyCode'; | ||
| sessionToken.mustVerify = true; | ||
| mocks.mockOAuthClientInfo({ | ||
| fetch: sinon.stub().resolves({ name: 'mockOauthClientName' }), |
Contributor
Author
There was a problem hiding this comment.
just a unique serviceName to implicitly check that we're calling the mockOAuthClient here
nshirley
commented
Feb 12, 2026
| function mockOAuthClientInfo(overrides) { | ||
| const mock = { | ||
| fetch: sinon.stub().resolves('sync'), | ||
| fetch: sinon.stub().resolves({ name: 'sync' }), |
Contributor
Author
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because:
This Commit:
Closes: FXA-13055
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Other information (Optional)
Any other information that is important to this pull request.