From 8fcd819e6fce2b0f5cd511c663329b2cd8e307cc Mon Sep 17 00:00:00 2001 From: Elysia <1628615876@qq.com> Date: Sat, 28 Mar 2026 00:40:36 +0800 Subject: [PATCH] feat: add user:file_upload OAuth scope Align OAuth scopes with upstream Claude Code client which now includes the user:file_upload scope for file upload support. Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/internal/pkg/oauth/oauth.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/internal/pkg/oauth/oauth.go b/backend/internal/pkg/oauth/oauth.go index cfc91bee..fea17c7a 100644 --- a/backend/internal/pkg/oauth/oauth.go +++ b/backend/internal/pkg/oauth/oauth.go @@ -21,12 +21,12 @@ const ( // OAuth endpoints AuthorizeURL = "https://claude.ai/oauth/authorize" TokenURL = "https://platform.claude.com/v1/oauth/token" - RedirectURI = "https://platform.claude.com/oauth/code/callback" + RedirectURI = "" // Scopes - Browser URL (includes org:create_api_key for user authorization) - ScopeOAuth = "org:create_api_key user:profile user:inference user:sessions:claude_code user:mcp_servers" + ScopeOAuth = "org:create_api_key user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload" // Scopes - Internal API call (org:create_api_key not supported in API) - ScopeAPI = "user:profile user:inference user:sessions:claude_code user:mcp_servers" + ScopeAPI = "user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload" // Scopes - Setup token (inference only) ScopeInference = "user:inference"