65 Commits

4 changed files with 10 additions and 22 deletions

4
.gitignore vendored
View File

@@ -11,7 +11,3 @@ config.toml
.DS_Store .DS_Store
DEBIAN/ DEBIAN/
usr/ usr/
oauth-secrets.json
secrets/
*.secret
.env

View File

@@ -3211,8 +3211,8 @@ class EditEndpointDialog(Gtk.Dialog):
token_path = os.path.expanduser("~/.cache/codex-proxy/google-antigravity-oauth-token.json" if is_antigravity else "~/.cache/codex-proxy/google-cli-oauth-token.json") token_path = os.path.expanduser("~/.cache/codex-proxy/google-antigravity-oauth-token.json" if is_antigravity else "~/.cache/codex-proxy/google-cli-oauth-token.json")
if is_antigravity: if is_antigravity:
CLIENT_ID = "REDACTED_ANTIGRAVITY_CLIENT_ID" CLIENT_ID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com"
CLIENT_SECRET = "REDACTED_ANTIGRAVITY_SECRET" CLIENT_SECRET = "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"
SCOPES = [ SCOPES = [
"https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.email",
@@ -3225,8 +3225,8 @@ class EditEndpointDialog(Gtk.Dialog):
callback_path = "/oauth-callback" callback_path = "/oauth-callback"
provider_kind = "antigravity" provider_kind = "antigravity"
else: else:
CLIENT_ID = "REDACTED_GEMINI_CLI_CLIENT_ID" CLIENT_ID = "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com"
CLIENT_SECRET = "REDACTED_GEMINI_CLI_SECRET" CLIENT_SECRET = "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"
SCOPES = [ SCOPES = [
"https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.email",

View File

@@ -69,7 +69,8 @@ For regular Gemini CLI OAuth, only `cloudcode-pa.googleapis.com` is used.
### 4.1 OAuth Flow ### 4.1 OAuth Flow
- **Client IDs**: Stored locally in `~/.config/codex-launcher/oauth-secrets.json` (not in repo) - **Client ID**: `884354919052-36trc1jjb3tguiac32ov6cod268c5blh.apps.googleusercontent.com`
(also `1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com`)
- **OAuth callback**: `https://antigravity.google/oauth-callback` - **OAuth callback**: `https://antigravity.google/oauth-callback`
- **Token storage**: `~/.cache/codex-proxy/google-antigravity-oauth-token.json` - **Token storage**: `~/.cache/codex-proxy/google-antigravity-oauth-token.json`
- **Token refresh**: via `https://oauth2.googleapis.com/token` - **Token refresh**: via `https://oauth2.googleapis.com/token`

View File

@@ -3273,17 +3273,9 @@ class EditEndpointDialog(Gtk.Dialog):
is_antigravity = oauth_provider == "google-antigravity" is_antigravity = oauth_provider == "google-antigravity"
token_path = os.path.expanduser("~/.cache/codex-proxy/google-antigravity-oauth-token.json" if is_antigravity else "~/.cache/codex-proxy/google-cli-oauth-token.json") token_path = os.path.expanduser("~/.cache/codex-proxy/google-antigravity-oauth-token.json" if is_antigravity else "~/.cache/codex-proxy/google-cli-oauth-token.json")
_oauth_secrets_path = os.path.expanduser("~/.config/codex-launcher/oauth-secrets.json")
try:
with open(_oauth_secrets_path) as _f:
_oauth_secrets = json.load(_f)
except Exception:
_oauth_secrets = {}
if is_antigravity: if is_antigravity:
_sec = _oauth_secrets.get("antigravity", {}) CLIENT_ID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com"
CLIENT_ID = _sec.get("client_id", "") CLIENT_SECRET = "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"
CLIENT_SECRET = _sec.get("client_secret", "")
SCOPES = [ SCOPES = [
"https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.email",
@@ -3296,9 +3288,8 @@ class EditEndpointDialog(Gtk.Dialog):
callback_path = "/oauth-callback" callback_path = "/oauth-callback"
provider_kind = "antigravity" provider_kind = "antigravity"
else: else:
_sec = _oauth_secrets.get("gemini_cli", {}) CLIENT_ID = "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com"
CLIENT_ID = _sec.get("client_id", "") CLIENT_SECRET = "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"
CLIENT_SECRET = _sec.get("client_secret", "")
SCOPES = [ SCOPES = [
"https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.email",