MCPcopy Index your code
hub / github.com/CapSoftware/Cap / createSessionRequestUrl

Function createSessionRequestUrl

apps/desktop/src/utils/auth.ts:62–76  ·  view source on GitHub ↗
(
	port: string | null,
	platform: "web" | "desktop",
)

Source from the content-addressed store, hash-verified

60}
61
62async function createSessionRequestUrl(
63 port: string | null,
64 platform: "web" | "desktop",
65) {
66 const serverUrl = await getConfiguredServerUrl();
67 const callbackUrl = new URL(
68 `/api/desktop/session/request?type=api_key`,
69 serverUrl,
70 );
71
72 if (port !== null) callbackUrl.searchParams.set("port", port);
73 callbackUrl.searchParams.set("platform", platform);
74
75 return callbackUrl;
76}
77
78async function createLocalServerSession(signal: AbortSignal) {
79 const localCallback = await startLocalCallbackSession(signal);

Callers 2

createLocalServerSessionFunction · 0.70

Calls 1

getConfiguredServerUrlFunction · 0.70

Tested by

no test coverage detected