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

Function writeLastOrgCookie

apps/cloud/src/auth/last-org-cookie.ts:28–32  ·  view source on GitHub ↗
(slug: string)

Source from the content-addressed store, hash-verified

26
27/** Browser-side write. Slugs are `[a-z0-9-]` by grammar, so no encoding. */
28export const writeLastOrgCookie = (slug: string): void => {
29 document.cookie = `${LAST_ORG_COOKIE}=${slug}; Path=/; Max-Age=${LAST_ORG_MAX_AGE_SECONDS}; SameSite=Lax${
30 window.location.protocol === "https:" ? "; Secure" : ""
31 }`;
32};

Callers 1

AuthProviderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected