fix: include scope parameter in OAuth authorization code token exchange #1669
+122
−6
Claude / Claude Code Review
completed
Mar 27, 2026 in 5m 5s
Code review found 2 potential issues
Found 5 candidates, confirmed 2. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | packages/client/src/client/auth.ts:1208-1210 |
exchangeAuthorization not updated to accept/forward scope |
Annotations
Check warning on line 1210 in packages/client/src/client/auth.ts
claude / Claude Code Review
exchangeAuthorization not updated to accept/forward scope
Nit: `exchangeAuthorization()` was not updated to accept or forward a `scope` parameter, even though this PR added scope support to `prepareAuthorizationCodeRequest()` which it calls (line 1324). This is a consistency gap — callers using `exchangeAuthorization()` directly cannot pass scope through to the token request. Not a regression since this function never had scope support before, but worth adding for API completeness.
Loading