Skip to content

Commit ea38c55

Browse files
fix(smartling): use oauthCallback to fix broken OAuth authentication [AIS-82] (#11049)
* fix(smartling): use oauthCallback to fix id_token not present in TokenSet Smartling's SSO returns only access_token and refresh_token — no id_token. client.callback() calls validateIdToken() after the code exchange and throws "id_token not present in TokenSet" when id_token is absent. client.oauthCallback() performs the same authorization_code grant but skips id_token validation entirely, which is correct here since the app only ever uses access_token and refresh_token. Confirmed broken in prod via CloudWatch: sls-apps-smartling-prd-app logging "Smartling OAuth failed with message: id_token not present in TokenSet" on every auth attempt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(smartling): update mock to use oauthCallback Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cabf541 commit ea38c55

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/smartling/lambda/src/index.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Client {
2727
return { code: '1234' };
2828
}
2929

30-
async callback() {
30+
async oauthCallback() {
3131
return {
3232
access_token: 'access-123',
3333
refresh_token: 'refresh_token-123',

apps/smartling/lambda/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function makeApp(fetchFn: any, issuer: any) {
5151

5252
try {
5353
const params = client.callbackParams(req);
54-
const data = await client.callback('', params);
54+
const data = await client.oauthCallback('', params);
5555

5656
res.redirect(
5757
`/frontend/index.html?access_token=${data.access_token}&refresh_token=${data.refresh_token}`

0 commit comments

Comments
 (0)