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

Function cookiePair

e2e/cloud/oauth-callback-org-scope.test.ts:25–30  ·  view source on GitHub ↗
(response: Response, name: string)

Source from the content-addressed store, hash-verified

23const unique = (prefix: string) => `${prefix}_${randomBytes(4).toString("hex")}`;
24
25const cookiePair = (response: Response, name: string): string | undefined => {
26 for (const header of response.headers.getSetCookie?.() ?? []) {
27 if (header.startsWith(`${name}=`)) return header.split(";")[0];
28 }
29 return undefined;
30};
31
32const cookieValue = (pair: string): string => {
33 const [, value] = pair.split(/=(.*)/s);

Callers 1

createOrganizationFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected