877f69c897
Add three HTTP endpoints for OAuth login without terminal access: - GET /oauth/authorize — generates PKCE params, redirects to claude.com/cai/oauth/authorize with code=true and full scopes - GET /callback — exchanges auth code for tokens via JSON POST to platform.claude.com/v1/oauth/token, writes ~/.claude/.credentials.json - GET /oauth/status — returns current credential state as JSON Uses SHA-256 (sha2 crate) for PKCE code challenge. The authorize URL targets claude.com/cai/ (not platform.claude.com) which is required for Max/Pro subscriptions to grant user:inference scope. Users visit http://localhost:3001/oauth/authorize in their browser to authenticate. Matrix/WhatsApp can send this link when auth fails. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
43 lines
1.1 KiB
TOML
43 lines
1.1 KiB
TOML
[workspace]
|
|
members = ["server"]
|
|
resolver = "3"
|
|
|
|
[workspace.dependencies]
|
|
async-stream = "0.3"
|
|
async-trait = "0.1.89"
|
|
bytes = "1"
|
|
chrono = { version = "0.4.44", features = ["serde"] }
|
|
eventsource-stream = "0.2.3"
|
|
futures = "0.3"
|
|
homedir = "0.3.6"
|
|
ignore = "0.4.25"
|
|
mime_guess = "2"
|
|
notify = "8.2.0"
|
|
poem = { version = "3", features = ["websocket", "test"] }
|
|
poem-openapi = { version = "5", features = ["swagger-ui"] }
|
|
portable-pty = "0.9.0"
|
|
reqwest = { version = "0.13.2", features = ["json", "stream"] }
|
|
rust-embed = "8"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
serde_urlencoded = "0.7"
|
|
sha2 = "0.10"
|
|
serde_yaml = "0.9"
|
|
strip-ansi-escapes = "0.2"
|
|
tempfile = "3"
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync"] }
|
|
toml = "1.1.0"
|
|
uuid = { version = "1.22.0", features = ["v4", "serde"] }
|
|
tokio-tungstenite = "0.29.0"
|
|
walkdir = "2.5.0"
|
|
filetime = "0.2"
|
|
matrix-sdk = { version = "0.16.0", default-features = false, features = [
|
|
"rustls-tls",
|
|
"sqlite",
|
|
"e2e-encryption",
|
|
] }
|
|
pulldown-cmark = { version = "0.13.3", default-features = false, features = [
|
|
"html",
|
|
] }
|
|
regex = "1"
|