Skip to content

fix(smartling): use oauthCallback to fix broken OAuth authentication [AIS-82] - #11049

Merged
Tyler (tylerwashington888) merged 2 commits into
masterfrom
fix/smartling-oauth-id-token
Jul 1, 2026
Merged

fix(smartling): use oauthCallback to fix broken OAuth authentication [AIS-82]#11049
Tyler (tylerwashington888) merged 2 commits into
masterfrom
fix/smartling-oauth-id-token

Conversation

@tylerwashington888

@tylerwashington888 Tyler (tylerwashington888) commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replaces client.callback() with client.oauthCallback() in the Smartling Lambda OAuth handler
  • Fixes active prod breakage: every user attempting to authenticate with Smartling is hitting id_token not present in TokenSet, getting bounced to the error redirect, and seeing the App SDK "outside of Contentful" console error
  • Confirmed via CloudWatch logs

Root cause

openid-client's callback() method calls validateIdToken() after the authorization code exchange and throws id_token not present in TokenSet when the token response doesn't include an id_token. Smartling's SSO (sso.smartling.com/auth/realms/Smartling) returns only access_token and refresh_token — a pure OAuth 2.0 response. oauthCallback() performs the identical authorization_code grant but skips id_token validation entirely, which is correct since the app only ever uses access_token and refresh_token.

Test plan

  • Deploy to test stage and complete a Smartling OAuth flow end-to-end
  • Confirm access_token and refresh_token are returned and the popup closes successfully
  • Confirm no Smartling OAuth failed errors in CloudWatch after deploy to prod

🤖 Generated with Claude Code on behalf of Tyler Washington (Codex agent)

…nSet

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>
@wiz-inc-38d59fb8d7

wiz-inc-38d59fb8d7 Bot commented Jul 1, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 4 Low
Software Management Finding Software Management Findings -
Total 4 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tylerwashington888 Tyler (tylerwashington888) changed the title fix(smartling): use oauthCallback to fix broken OAuth authentication fix(smartling): use oauthCallback to fix broken OAuth authentication [AIS-82] Jul 1, 2026
@tylerwashington888
Tyler (tylerwashington888) merged commit ea38c55 into master Jul 1, 2026
14 of 15 checks passed
@tylerwashington888
Tyler (tylerwashington888) deleted the fix/smartling-oauth-id-token branch July 1, 2026 23:12
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.

3 participants