From c7d7bf47d670d87585a4ed2194e5f3c858d4ebd0 Mon Sep 17 00:00:00 2001 From: shaw Date: Wed, 21 Jan 2026 10:06:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0claude=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7oauth=E9=93=BE=E6=8E=A5=E7=94=9F=E6=88=90=E8=A7=84?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/oauthHelper.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/oauthHelper.js b/src/utils/oauthHelper.js index 556e4243..6d9ded0c 100644 --- a/src/utils/oauthHelper.js +++ b/src/utils/oauthHelper.js @@ -13,8 +13,8 @@ const OAUTH_CONFIG = { AUTHORIZE_URL: 'https://claude.ai/oauth/authorize', TOKEN_URL: 'https://console.anthropic.com/v1/oauth/token', CLIENT_ID: '9d1c250a-e61b-44d9-88ed-5944d1962f5e', - REDIRECT_URI: 'https://console.anthropic.com/oauth/code/callback', - SCOPES: 'org:create_api_key user:profile user:inference', + REDIRECT_URI: 'https://platform.claude.com/oauth/code/callback', + SCOPES: 'org:create_api_key user:profile user:inference user:sessions:claude_code', SCOPES_SETUP: 'user:inference' // Setup Token 只需要推理权限 } @@ -35,6 +35,7 @@ function generateState() { /** * 生成随机的 code verifier(PKCE) + * 符合 RFC 7636 标准:32字节随机数 → base64url编码 → 43字符 * @returns {string} base64url 编码的随机字符串 */ function generateCodeVerifier() {