From ef5901c81b40663006957f154f8ae7c21bf5e7d5 Mon Sep 17 00:00:00 2001 From: Grivn Date: Fri, 20 Feb 2026 20:11:27 +0800 Subject: [PATCH] fix(claude): use api.anthropic.com for OAuth token exchange console.anthropic.com is now protected by a Cloudflare managed challenge that blocks all non-browser POST requests to /v1/oauth/token, causing `-claude-login` to fail with a 403 error. Switch to api.anthropic.com which hosts the same OAuth token endpoint without the Cloudflare managed challenge. Fixes #1659 Co-Authored-By: Claude Opus 4.6 --- internal/auth/claude/anthropic_auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/auth/claude/anthropic_auth.go b/internal/auth/claude/anthropic_auth.go index e0f6e3c8..2853e418 100644 --- a/internal/auth/claude/anthropic_auth.go +++ b/internal/auth/claude/anthropic_auth.go @@ -20,7 +20,7 @@ import ( // OAuth configuration constants for Claude/Anthropic const ( AuthURL = "https://claude.ai/oauth/authorize" - TokenURL = "https://console.anthropic.com/v1/oauth/token" + TokenURL = "https://api.anthropic.com/v1/oauth/token" ClientID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e" RedirectURI = "http://localhost:54545/callback" )