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

Function createSignInMutation

apps/desktop/src/utils/auth.ts:30–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28type AuthParams = z.infer<typeof paramsValidator>;
29
30export function createSignInMutation() {
31 return createMutation(() => ({
32 mutationFn: async (abort: AbortController) => {
33 const session = (await shouldUseLocalServerSession())
34 ? await createLocalServerSession(abort.signal)
35 : await createHybridDesktopSession(abort.signal);
36
37 await shell.open(session.url.toString());
38
39 const res = await session.complete();
40 if (res) await processAuthData(res);
41
42 getCurrentWindow().setFocus();
43 },
44 }));
45}
46
47async function getConfiguredServerUrl() {
48 return (

Callers 5

SignInButtonFunction · 0.90
ExportPageFunction · 0.90
PageFunction · 0.90
SettingsFunction · 0.90
PageFunction · 0.90

Calls 5

createLocalServerSessionFunction · 0.85
processAuthDataFunction · 0.85
openMethod · 0.45

Tested by

no test coverage detected