Skip to main content
Glama
check.tsβ€’2.23 kB
/** * auth-check: Check App Store / Google Play authentication status */ import { getStoreTargets } from "@/packages/configs/aso-config/store"; import { type StoreType } from "@/packages/configs/aso-config/types"; import { AppStoreService } from "@/core/services/app-store-service"; import { GooglePlayService } from "@/core/services/google-play-service"; const appStoreService = new AppStoreService(); const googlePlayService = new GooglePlayService(); interface AuthCheckOptions { store?: StoreType; } export async function handleAuthCheck(options: AuthCheckOptions) { const { store } = options; const { store: targetStore, includeAppStore, includeGooglePlay, } = getStoreTargets(store); const results: string[] = []; console.error(`[MCP] πŸ” Checking authentication (store: ${targetStore})`); if (includeAppStore) { console.error(`[MCP] Checking App Store Connect...`); const appStoreResult = await appStoreService.verifyAuth(300); if (appStoreResult.success && appStoreResult.data) { results.push(`βœ… **App Store Connect**`); results.push(` Issuer ID: ${appStoreResult.data.payload.iss}`); results.push(` Key ID: ${appStoreResult.data.header.kid}`); results.push(` JWT created successfully`); } else { results.push(`❌ **App Store Connect**`); results.push( ` ${appStoreResult.error?.message || "Authentication failed"}` ); } results.push(""); } if (includeGooglePlay) { console.error(`[MCP] Checking Google Play Console...`); const playStoreResult = await googlePlayService.verifyAuth(); if (playStoreResult.success && playStoreResult.data) { results.push(`βœ… **Google Play Console**`); results.push(` Project: ${playStoreResult.data.project_id}`); results.push(` Service Account: ${playStoreResult.data.client_email}`); } else { results.push(`❌ **Google Play Console**`); results.push( ` ${playStoreResult.error?.message || "Authentication failed"}` ); } } return { content: [ { type: "text" as const, text: `πŸ” **Authentication Status**\n\n${results.join("\n")}`, }, ], }; }

Implementation Reference

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/quartz-labs-dev/pabal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server