Skip to content

fix(web): point to claude setup-token for Anthropic OAuth tokens - #460

Open
gabriel-accetta wants to merge 1 commit into
onecli:mainfrom
gabriel-accetta:fix/anthropic-setup-token-guidance
Open

fix(web): point to claude setup-token for Anthropic OAuth tokens#460
gabriel-accetta wants to merge 1 commit into
onecli:mainfrom
gabriel-accetta:fix/anthropic-setup-token-guidance

Conversation

@gabriel-accetta

Copy link
Copy Markdown

I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

Bug fix (web/UX). Closes #459. Follow-up to #322.

What is the current behavior?

The Anthropic secret form says "Paste your API key or OAuth token from the Anthropic Console." Two different OAuth tokens share the sk-ant-oat prefix, the one Claude Code rotates internally every few hours, and the long-lived one from claude setup-token and nothing distinguishes them. Pasting the former means 401s a few hours later, which is what #322 hit. The doc note promised there was never added (grep -rn "setup-token" → no hits). The current copy also misattributes the OAuth token to the Console, which isn't where it comes from.

What is the new behavior?

The helper text now names claude setup-token, and when the entered value is detected as OAuth (detectAnthropicAuthMode(value) === "oauth") it warns that Claude Code's own token rotates every few hours and points at the long-lived one. Styling matches the existing Codex OAuth hint.

Feel free to include screenshots if it includes visual changes.

Additional context

Screenshots of both states:
image
image

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.

Anthropic secret form doesn't say which OAuth token to use

1 participant