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

Function createLocalServerSession

apps/desktop/src/utils/auth.ts:78–93  ·  view source on GitHub ↗
(signal: AbortSignal)

Source from the content-addressed store, hash-verified

76}
77
78async function createLocalServerSession(signal: AbortSignal) {
79 const localCallback = await startLocalCallbackSession(signal);
80
81 return {
82 url: await createSessionRequestUrl(localCallback.port, "web"),
83 complete: async () => {
84 const result = await localCallback.complete;
85 await localCallback.dispose();
86
87 if (!result) return null;
88 if (signal.aborted) throw new Error("Sign in aborted");
89
90 return result;
91 },
92 };
93}
94
95async function createHybridDesktopSession(signal: AbortSignal) {
96 const deepLink = await startDeepLinkSession(signal);

Callers 1

createSignInMutationFunction · 0.85

Calls 3

disposeMethod · 0.80
createSessionRequestUrlFunction · 0.70

Tested by

no test coverage detected