apispoof 3.1.0 → 3.2.0

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.
Files changed (2) hide show
  1. package/dist/cli.js +4 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -474,7 +474,8 @@ function generatePKCE() {
474
474
  var ANTHROPIC_OAUTH = {
475
475
  authUrl: "https://platform.claude.com/oauth/authorize",
476
476
  tokenUrl: "https://platform.claude.com/oauth/token",
477
- clientId: "https://claude.ai/oauth/claude-code-client-metadata",
477
+ clientId: "9d1c250a-e61b-44d9-88ed-5944d1962f5e",
478
+ scopes: "user:inference user:profile",
478
479
  callbackPath: "/callback",
479
480
  tokenContentType: "json"
480
481
  };
@@ -645,7 +646,8 @@ async function getValidToken(provider) {
645
646
  async function connectWithOAuth(provider) {
646
647
  const config = configFor(provider);
647
648
  const callbackPort = 18920 + Math.floor(Math.random() * 1e3);
648
- const redirectUri = `http://127.0.0.1:${callbackPort}${config.callbackPath}`;
649
+ const host = provider === "anthropic" ? "localhost" : "127.0.0.1";
650
+ const redirectUri = `http://${host}:${callbackPort}${config.callbackPath}`;
649
651
  const { verifier, challenge } = generatePKCE();
650
652
  const state = (0, import_crypto3.randomBytes)(16).toString("hex");
651
653
  const authUrl = new URL(config.authUrl);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apispoof",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "Turn your AI subscriptions into an OpenAI-compatible API — connect via OAuth or API key, zero config",
5
5
  "keywords": [
6
6
  "claude", "openai", "gemini", "anthropic", "google",