fix: match Claude Code's OAuth params exactly — add code=true and full scopes
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m3s

Claude Code sends code=true param and requests all 5 scopes:
org:create_api_key user:profile user:inference user:sessions:claude_code
user:mcp_servers. Wraith was only requesting user:inference and missing
the code=true flag, which likely caused the token exchange rejection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell 2026-03-17 12:38:35 -04:00
parent 4d198e9014
commit 9e1b8d7b61

View File

@ -138,10 +138,11 @@ func (o *OAuthManager) StartLogin(openURL func(string) error) (<-chan error, err
// Build the authorize URL // Build the authorize URL
params := url.Values{ params := url.Values{
"code": {"true"},
"response_type": {"code"}, "response_type": {"code"},
"client_id": {o.clientID}, "client_id": {o.clientID},
"redirect_uri": {redirectURI}, "redirect_uri": {redirectURI},
"scope": {"user:inference"}, "scope": {"org:create_api_key user:profile user:inference user:sessions:claude_code user:mcp_servers"},
"state": {state}, "state": {state},
"code_challenge": {challenge}, "code_challenge": {challenge},
"code_challenge_method": {"S256"}, "code_challenge_method": {"S256"},