endSignIn

tcmts.atproto.endSignIn · #ex5wa5c6 · function · runs on the server

uses tcmts.atproto.lib.server.session, which uses tcmts.atproto.lib.server.sessionOf, which uses #tcm/host (database)

Sign the caller out of the app's server.

import { clearSession, session, setSession } from "#codebase/tcmts/atproto/lib/server";

export async function endSignIn(): Promise<void> {
  const { atproto: _, ...rest } = session();
  if (Object.keys(rest).length) setSession(rest);
  else clearSession();
}

uses

used by