refactor(guild): remove center shared secret dependency
This commit is contained in:
@@ -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 }),
|
||||
|
||||
Reference in New Issue
Block a user