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

Function signUp

apps/host-selfhost/src/mcp/mcp-oauth.test.ts:88–100  ·  view source on GitHub ↗
(email: string)

Source from the content-addressed store, hash-verified

86const json = async (res: Response) => (await res.json()) as Record<string, unknown>;
87
88const signUp = async (email: string): Promise<string> => {
89 const inviteCode = await mintInviteCode(handler);
90 const res = await handler(
91 new Request(`${BASE}/api/auth/sign-up/email`, {
92 method: "POST",
93 headers: { "content-type": "application/json" },
94 body: JSON.stringify({ email, password: "password-12345678", name: email, inviteCode }),
95 }),
96 );
97 expect(res.status).toBe(200);
98 // The session cookie lets /mcp/authorize skip the interactive login.
99 return res.headers.get("set-cookie") ?? "";
100};
101
102const b64url = (buf: Uint8Array): string =>
103 btoa(String.fromCharCode(...buf))

Callers 1

mcp-oauth.test.tsFile · 0.70

Calls 3

mintInviteCodeFunction · 0.90
getMethod · 0.65
handlerFunction · 0.50

Tested by

no test coverage detected