From db85e69ef3a2fddca11de1a44dd634039ada05f1 Mon Sep 17 00:00:00 2001 From: nav Date: Wed, 13 May 2026 08:36:17 +0000 Subject: [PATCH] refactor(guild): remove center shared secret dependency --- .env.example | 1 - src/common/center-auth.ts | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 9288d56..0ae91ba 100644 --- a/.env.example +++ b/.env.example @@ -17,5 +17,4 @@ GUILD_PUBLIC_ENDPOINT=http://localhost:7002 # Center handshake CENTER_BASE_URL=http://backend-center:7001 -CENTER_SHARED_SECRET=change-me-center-secret CENTER_API_KEY= diff --git a/src/common/center-auth.ts b/src/common/center-auth.ts index ecfd3bf..39e530b 100644 --- a/src/common/center-auth.ts +++ b/src/common/center-auth.ts @@ -1,10 +1,9 @@ export async function introspectGuildToken(token: string): Promise<{ active: boolean; user?: { id: string; email?: string } }> { const centerBaseUrl = process.env.CENTER_BASE_URL; - const sharedSecret = process.env.CENTER_SHARED_SECRET; const guildNodeId = process.env.GUILD_NODE_ID; const centerApiKey = process.env.CENTER_API_KEY; - if (!centerBaseUrl || !sharedSecret || !guildNodeId || !centerApiKey) { + if (!centerBaseUrl || !guildNodeId || !centerApiKey) { return { active: false }; } @@ -12,7 +11,6 @@ export async function introspectGuildToken(token: string): Promise<{ active: boo method: 'POST', headers: { 'content-type': 'application/json', - 'x-center-shared-secret': sharedSecret, 'x-api-key': centerApiKey, }, body: JSON.stringify({ token, guildNodeId }),