Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix(control-api): keep Grok OAuth client id only in config.ts

Jose Gabriel Ramirez Encinasbb711de84c2a
diff --git a/control-api/package-lock.json b/control-api/package-lock.json
index 7e4876b2f..6674f48de 100644
--- a/control-api/package-lock.json
+++ b/control-api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-api",
- "version": "0.1.563",
+ "version": "0.1.564",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-api",
- "version": "0.1.563",
+ "version": "0.1.564",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/grok-provider-attempt-contract": "file:../packages/grok-provider-attempt-contract",
diff --git a/control-api/package.json b/control-api/package.json
index c307c1a4c..cdf588a79 100644
--- a/control-api/package.json
+++ b/control-api/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-api",
- "version": "0.1.563",
+ "version": "0.1.564",
"description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets",
"main": "dist/main.js",
"engines": {
diff --git a/control-api/src/config.ts b/control-api/src/config.ts
index 95debffa3..aa666df10 100644
--- a/control-api/src/config.ts
+++ b/control-api/src/config.ts
@@ -819,6 +819,8 @@ export const config: Config = {
codexOAuthClientId:
process.env.CONTROL_API_CODEX_OAUTH_CLIENT_ID || 'app_EMoamEEZ73f0CkXaXp7hrann',
grokSubscriptionEnabled: process.env.CONTROL_API_GROK_SUBSCRIPTION_ENABLED === 'true',
+ // Public native client used by Grok CLI / SuperGrok device-code login.
+ // This is not a confidential client secret. Same shape as Codex above.
grokOAuthClientId:
process.env.CONTROL_API_GROK_OAUTH_CLIENT_ID || 'b1a00492-073a-47ea-816f-4c329264a828',
// Default 24h. Validated (not merely parsed): the value goes straight into
diff --git a/control-api/src/services/grokSubscriptionOAuth.ts b/control-api/src/services/grokSubscriptionOAuth.ts
index 938d0df87..11f697b36 100644
--- a/control-api/src/services/grokSubscriptionOAuth.ts
+++ b/control-api/src/services/grokSubscriptionOAuth.ts
@@ -49,7 +49,6 @@ export const GROK_OAUTH_SCOPES = [
'conversations:read',
'conversations:write',
] as const
-export const GROK_OAUTH_DEFAULT_CLIENT_ID = 'b1a00492-073a-47ea-816f-4c329264a828'
const DEVICE_CODE_TIMEOUT_SECONDS = 15 * 60
const TOKEN_TIMEOUT_MS = 15_000
diff --git a/scripts/tests/test-grok-subscription-t0.sh b/scripts/tests/test-grok-subscription-t0.sh
index 836c08566..6f5c0fe65 100755
--- a/scripts/tests/test-grok-subscription-t0.sh
+++ b/scripts/tests/test-grok-subscription-t0.sh
@@ -120,8 +120,8 @@ api_token_url="$(
"${ROOT}/control-api/src/services/grokSubscriptionOAuth.ts"
)"
api_client_id="$(
- sed -n "s/^export const GROK_OAUTH_DEFAULT_CLIENT_ID = '\\(.*\\)'$/\\1/p" \
- "${ROOT}/control-api/src/services/grokSubscriptionOAuth.ts"
+ sed -n "s/.*CONTROL_API_GROK_OAUTH_CLIENT_ID || '\\(.*\\)',$/\\1/p" \
+ "${ROOT}/control-api/src/config.ts"
)"
if [[ "${api_device_url}" == "${expected_device_url}" &&
"${api_token_url}" == "${expected_token_url}" &&