signedInHere

tcmts.registry.session.signedInHere · #ot6mydx3 · term · runs on the server

uses tcmts.server.setCookie, which uses tcmts.server.requestNow, which uses tcmts.server.callNow, which uses #tcm/host (call)

Tell the registry who this browser is signed in as (or that nobody is), for the pages it renders.

import { SIGNED_IN_COOKIE } from "#codebase/tcmts/registry";
import { deleteCookie, setCookie } from "#codebase/tcmts/server";

export async function signedInHere(did: string | undefined): Promise<void> {
  if (did) setCookie(SIGNED_IN_COOKIE, did, { maxAge: 365 * 86400, path: "/" });
  else deleteCookie(SIGNED_IN_COOKIE, { path: "/" });
}

uses

used by