MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / lookupClientName

Function lookupClientName

apps/host-selfhost/src/auth/index.ts:54–61  ·  view source on GitHub ↗
(clientId: string)

Source from the content-addressed store, hash-verified

52 // just-written DCR row) so the approval screen reads "Connect Codex?" not a
53 // random id. Self-declared at open DCR — a label, not a trust signal.
54 const lookupClientName = async (clientId: string): Promise<string | null> => {
55 const ctx = await betterAuth.auth.$context;
56 const app = await ctx.adapter.findOne<{ name?: string | null }>({
57 model: "oauthApplication",
58 where: [{ field: "clientId", value: clientId }],
59 });
60 return app?.name ?? null;
61 };
62
63 // Force the MCP approval screen: inject `prompt=consent` on every MCP
64 // authorize so a connecting client is gated on /mcp-consent rather than

Callers 1

authHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected