MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / signInToken

Function signInToken

apps/host-selfhost/src/testing/mint-invite.ts:17–26  ·  view source on GitHub ↗
(handler: Handler, email: string, password: string)

Source from the content-addressed store, hash-verified

15const BASE = "http://localhost:4788/api";
16
17const signInToken = async (handler: Handler, email: string, password: string): Promise<string> => {
18 const response = await handler(
19 new Request("http://localhost:4788/api/auth/sign-in/email", {
20 method: "POST",
21 headers: { "content-type": "application/json" },
22 body: JSON.stringify({ email, password }),
23 }),
24 );
25 return response.headers.get("set-auth-token") ?? "";
26};
27
28// A FetchHttpClient backed by the in-process handler, carrying the admin bearer.
29const clientLayer = (handler: Handler, token: string) =>

Callers 1

mintInviteCodeFunction · 0.85

Calls 2

getMethod · 0.65
handlerFunction · 0.50

Tested by

no test coverage detected