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

Function processAuthData

apps/desktop/src/utils/auth.ts:218–232  ·  view source on GitHub ↗
(data: AuthParams)

Source from the content-addressed store, hash-verified

216}
217
218async function processAuthData(data: AuthParams) {
219 identifyUser(data.user_id);
220 trackEvent("user_signed_in", { platform: "desktop" });
221
222 await authStore.set({
223 secret:
224 "api_key" in data
225 ? { api_key: data.api_key }
226 : { token: data.token, expires: data.expires },
227 user_id: data.user_id,
228 plan: null,
229 });
230
231 await commands.updateAuthPlan();
232}

Callers 1

createSignInMutationFunction · 0.85

Calls 2

identifyUserFunction · 0.90
trackEventFunction · 0.90

Tested by

no test coverage detected