Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
fix(oauth): hardcode desktop OAuth client secrets to fix build-time inlining
diegosouzapw168b17adc7f0
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 0bfa23a382..508e8ac7b8 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0---+## [1.4.2] — 2026-02-23++### 🐛 Bug Fix++- **OAuth Token Refresh** — Fixed `client_secret is missing` error for Google-based OAuth providers (Antigravity, Gemini, Gemini CLI, iFlow). Desktop/CLI OAuth secrets are now hardcoded as defaults since Next.js inlined empty strings at build time.++---+## [1.4.1] — 2026-02-23### 🔧 Improvementsdiff --git a/open-sse/config/providerRegistry.ts b/open-sse/config/providerRegistry.tsindex b4c256ccea..0d0b8c9968 100644--- a/open-sse/config/providerRegistry.ts+++ b/open-sse/config/providerRegistry.ts@@ -108,7 +108,7 @@ export const REGISTRY: Record<string, RegistryEntry> = {clientIdEnv: "GEMINI_OAUTH_CLIENT_ID",clientIdDefault: "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecretEnv: "GEMINI_OAUTH_CLIENT_SECRET",- clientSecretDefault: "",+ clientSecretDefault: "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",},models: [{ id: "gemini-3-pro-preview", name: "Gemini 3 Pro Preview" },@@ -134,7 +134,7 @@ export const REGISTRY: Record<string, RegistryEntry> = {clientIdEnv: "GEMINI_CLI_OAUTH_CLIENT_ID",clientIdDefault: "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecretEnv: "GEMINI_CLI_OAUTH_CLIENT_SECRET",- clientSecretDefault: "",+ clientSecretDefault: "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",},models: [{ id: "gemini-3-flash-preview", name: "Gemini 3 Flash Preview" },@@ -223,7 +223,7 @@ export const REGISTRY: Record<string, RegistryEntry> = {clientIdEnv: "IFLOW_OAUTH_CLIENT_ID",clientIdDefault: "10009311001",clientSecretEnv: "IFLOW_OAUTH_CLIENT_SECRET",- clientSecretDefault: "",+ clientSecretDefault: "4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",tokenUrl: "https://iflow.cn/oauth/token",authUrl: "https://iflow.cn/oauth",},@@ -261,7 +261,7 @@ export const REGISTRY: Record<string, RegistryEntry> = {clientIdEnv: "ANTIGRAVITY_OAUTH_CLIENT_ID",clientIdDefault: "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecretEnv: "ANTIGRAVITY_OAUTH_CLIENT_SECRET",- clientSecretDefault: "",+ clientSecretDefault: "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",},models: [{ id: "claude-opus-4-6-thinking", name: "Claude Opus 4.6 Thinking" },diff --git a/package.json b/package.jsonindex 0293f5ae06..6ffd70bcbb 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "omniroute",- "version": "1.4.1",+ "version": "1.4.2","description": "Smart AI Router with auto fallback — route to FREE & cheap models, zero downtime. Works with Cursor, Cline, Claude Desktop, Codex, and any OpenAI-compatible tool.","type": "module","bin": {diff --git a/src/lib/oauth/constants/oauth.ts b/src/lib/oauth/constants/oauth.tsindex 042386d3e5..29bcb12edd 100644--- a/src/lib/oauth/constants/oauth.ts+++ b/src/lib/oauth/constants/oauth.ts@@ -36,7 +36,7 @@ export const GEMINI_CONFIG = {clientId:process.env.GEMINI_OAUTH_CLIENT_ID ||"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",- clientSecret: process.env.GEMINI_OAUTH_CLIENT_SECRET || "",+ clientSecret: process.env.GEMINI_OAUTH_CLIENT_SECRET || "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",authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",tokenUrl: "https://oauth2.googleapis.com/token",userInfoUrl: "https://www.googleapis.com/oauth2/v1/userinfo",@@ -59,7 +59,7 @@ export const QWEN_CONFIG = {// iFlow OAuth Configuration (Authorization Code)export const IFLOW_CONFIG = {clientId: process.env.IFLOW_OAUTH_CLIENT_ID || "10009311001",- clientSecret: process.env.IFLOW_OAUTH_CLIENT_SECRET || "",+ clientSecret: process.env.IFLOW_OAUTH_CLIENT_SECRET || "4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",authorizeUrl: "https://iflow.cn/oauth",tokenUrl: "https://iflow.cn/oauth/token",userInfoUrl: "https://iflow.cn/api/oauth/getUserInfo",@@ -98,7 +98,7 @@ export const ANTIGRAVITY_CONFIG = {process.env.ANTIGRAVITY_OAUTH_CLIENT_ID ||"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:- process.env.ANTIGRAVITY_OAUTH_CLIENT_SECRET || "",+ process.env.ANTIGRAVITY_OAUTH_CLIENT_SECRET || "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",authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",tokenUrl: "https://oauth2.googleapis.com/token",userInfoUrl: "https://www.googleapis.com/oauth2/v1/userinfo",