{"version":"2.1.323","anchor":"oauth-token-requests-now-forward-a-refusednot-refused-token","canonical_anchor":"oauth-token-requests-now-forward-a-refusednot-refused-token","heading":"SDK sign-in callback is now told whether the last token was refused","tier":"use","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323\/e\/oauth-token-requests-now-forward-a-refusednot-refused-token","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323","markdown":"### SDK sign-in callback is now told whether the last token was refused\n\nWhen a host asks for a sign-in token, Claude Code now passes `getOAuthToken` whether the previous one was refused\n\n**What**\n\nThe SDK is the kit for building programs on top of Claude Code. Such a program can supply a `getOAuthToken` callback that hands Claude Code a sign-in token.\n\nWhen the program asks for a token, Claude Code now passes the callback a `tokenState` value as well as the kind of token. It does so only when that value is `refused` or `not_refused`.\n\n**Why**\n\nThe callback can now tell whether the previous token was refused, which can shape how it gets a fresh one.\n\n- Area: SDK\n- Names: `getOAuthToken`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}