refactor(open-sse): dedupe Google OAuth client credentials (#4)
clientId/clientSecret của antigravity + gemini bị lặp 3 nơi (registry, usage.js, src/lib/oauth). Gom vào shared.js (ANTIGRAVITY_OAUTH_CLIENT, GOOGLE_OAUTH_CLIENT), các file spread vào. Byte-for-byte: PROVIDERS/alias/oauth-url equal, golden 142 pass. Thêm test guard nội dung + alias resolution. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
* OAuth Configuration Constants
|
||||
*/
|
||||
import { platform, arch } from "os";
|
||||
import { ANTIGRAVITY_OAUTH_CLIENT, GOOGLE_OAUTH_CLIENT } from "open-sse/providers/shared.js";
|
||||
|
||||
/**
|
||||
* Get the platform enum value based on the current OS.
|
||||
@@ -42,8 +43,7 @@ export const CODEX_CONFIG = {
|
||||
|
||||
// Gemini (Google) OAuth Configuration (Standard OAuth2)
|
||||
export const GEMINI_CONFIG = {
|
||||
clientId: "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",
|
||||
clientSecret: "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",
|
||||
...GOOGLE_OAUTH_CLIENT,
|
||||
authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",
|
||||
tokenUrl: "https://oauth2.googleapis.com/token",
|
||||
userInfoUrl: "https://www.googleapis.com/oauth2/v1/userinfo",
|
||||
@@ -94,8 +94,7 @@ export const IFLOW_CONFIG = {
|
||||
|
||||
// Antigravity OAuth Configuration (Standard OAuth2 with Google)
|
||||
export const ANTIGRAVITY_CONFIG = {
|
||||
clientId: "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",
|
||||
clientSecret: "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",
|
||||
...ANTIGRAVITY_OAUTH_CLIENT,
|
||||
authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",
|
||||
tokenUrl: "https://oauth2.googleapis.com/token",
|
||||
userInfoUrl: "https://www.googleapis.com/oauth2/v1/userinfo",
|
||||
|
||||
Reference in New Issue
Block a user