Fix the anthropic auth url
This commit is contained in:
@@ -24,7 +24,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
authURL = "https://claude.com/cai/oauth/authorize"
|
authURL = "https://claude.ai/oauth/authorize"
|
||||||
manualRedirect = "https://platform.claude.com/oauth/code/callback"
|
manualRedirect = "https://platform.claude.com/oauth/code/callback"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ func Login(ctx context.Context) (*Credential, error) {
|
|||||||
authCode = code
|
authCode = code
|
||||||
isManual = false
|
isManual = false
|
||||||
case code := <-stdinCh:
|
case code := <-stdinCh:
|
||||||
authCode = code
|
authCode = strings.SplitN(code, "#", 2)[0]
|
||||||
isManual = true
|
isManual = true
|
||||||
case <-timeout.C:
|
case <-timeout.C:
|
||||||
return nil, fmt.Errorf("login timed out after 120 seconds")
|
return nil, fmt.Errorf("login timed out after 120 seconds")
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
tokenEndpoint = "https://platform.claude.com/v1/oauth/token"
|
tokenEndpoint = "https://api.anthropic.com/v1/oauth/token"
|
||||||
clientID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e"
|
clientID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e"
|
||||||
oauthScopes = "user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload"
|
oauthScopes = "user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user