MCPcopy Create free account
hub / github.com/arctic-cli/interface / waitForCallback

Function waitForCallback

packages/arctic/src/mcp/oauth-callback.ts:142–153  ·  view source on GitHub ↗
(mcpName: string)

Source from the content-addressed store, hash-verified

140 }
141
142 export function waitForCallback(mcpName: string): Promise<string> {
143 return new Promise((resolve, reject) => {
144 const timeout = setTimeout(() => {
145 if (pendingAuths.has(mcpName)) {
146 pendingAuths.delete(mcpName)
147 reject(new Error("OAuth callback timeout - authorization took too long"))
148 }
149 }, CALLBACK_TIMEOUT_MS)
150
151 pendingAuths.set(mcpName, { resolve, reject, timeout })
152 })
153 }
154
155 export function cancelPending(mcpName: string): void {
156 const pending = pendingAuths.get(mcpName)

Callers

nothing calls this directly

Calls 2

deleteMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected