{"version":"2.1.326","anchor":"oauth-token-env-warning-on-login","canonical_anchor":"oauth-token-env-warning-on-login","heading":"Sign-in and sign-out give clearer messages, and logout checks that your login was revoked","tier":"notice","area":"Auth","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326\/e\/oauth-token-env-warning-on-login","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326","markdown":"### Sign-in and sign-out give clearer messages, and logout checks that your login was revoked\n\nLogin, logout and OAuth token handling change: clearer sign-in errors, a revoke check on logout and a warning about CLAUDE_CODE_OAUTH_TOKEN\n\n**What**\n\nOAuth is the sign-in method Claude Code uses with your Anthropic account. Several parts of signing in and out changed.\n\n- `\/login` warning: a new message says `CLAUDE_CODE_OAUTH_TOKEN` was set in your environment when `\/login` started, and that the session will use the new credentials.\n\n- Rejected token: when a request fails with a 401 (not signed in) and the token came from the environment, Claude Code now tells an embedding app's `heard` hook which token failed before it waits for a replacement token.\n\n- Logout: Claude Code now revokes the Claude.ai refresh token and checks the answer. If Anthropic does not confirm, it warns \"Logged out on this computer, but Anthropic didn't confirm the login was revoked.\" and still completes. Before, the result was ignored. If the config file cannot be saved, logout fails with \"logout could not save the config file\".\n\n- Pasting a code: a bad pasted code is now shown as a problem on the waiting screen instead of an \"Invalid code\" error, and pressing no clears the pasted text or the problem before going back.\n\n- Messages: a failed token exchange now says \"Couldn't finish signing in. Try again.\" The setup-token success screen now says \"Long-lived authentication token created\" and adds where the token can be revoked.\n\n**Why**\n\nYou are told when logout may have left your login active on Anthropic's side, and sign-in mistakes are easier to recover from. If you keep `CLAUDE_CODE_OAUTH_TOKEN` set, you now know `\/login` replaces it for that session.\n\n- Area: Auth\n- Names: `\/login`, `CLAUDE_CODE_OAUTH_TOKEN`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}