@askalf/dario 3.2.6 → 3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/oauth.js +6 -4
- package/package.json +1 -1
package/dist/oauth.js
CHANGED
|
@@ -8,11 +8,13 @@ import { randomBytes, createHash } from 'node:crypto';
|
|
|
8
8
|
import { readFile, writeFile, mkdir, rename } from 'node:fs/promises';
|
|
9
9
|
import { dirname, join } from 'node:path';
|
|
10
10
|
import { homedir } from 'node:os';
|
|
11
|
-
// Claude Code's public OAuth client (PKCE, no secret needed)
|
|
12
|
-
const OAUTH_CLIENT_ID = '
|
|
13
|
-
|
|
11
|
+
// Claude Code's public OAuth client (PKCE, no secret needed) — extracted from CC v2.1.104 binary
|
|
12
|
+
const OAUTH_CLIENT_ID = '22422756-60c9-4084-8eb7-27705fd5cf9a';
|
|
13
|
+
// Max Plan OAuth (for Claude Pro/Max subscriptions) — claude.com/cai/oauth/authorize
|
|
14
|
+
const OAUTH_AUTHORIZE_URL = 'https://claude.com/cai/oauth/authorize';
|
|
14
15
|
const OAUTH_TOKEN_URL = 'https://platform.claude.com/v1/oauth/token';
|
|
15
|
-
|
|
16
|
+
// Max plan scopes (excludes org:create_api_key which requires Console plan)
|
|
17
|
+
const OAUTH_SCOPES = 'user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload';
|
|
16
18
|
// Refresh 30 min before expiry
|
|
17
19
|
const REFRESH_BUFFER_MS = 30 * 60 * 1000;
|
|
18
20
|
// After a failed refresh, don't retry for 60s to avoid spam
|