MCPcopy Create free account
hub / github.com/DeepNotesApp/DeepNotes / logout

Function logout

apps/app-server/src/trpc/api/sessions/logout.ts:10–24  ·  view source on GitHub ↗
({
  ctx,
}: InferProcedureOpts<typeof optionalAuthProcedure>)

Source from the content-addressed store, hash-verified

8);
9
10export async function logout({
11 ctx,
12}: InferProcedureOpts<typeof optionalAuthProcedure>) {
13 // Invalidate session
14
15 if (ctx.sessionId != null) {
16 await ctx.dataAbstraction.patch('session', ctx.sessionId, {
17 invalidated: true,
18 });
19 }
20
21 // Clear cookies
22
23 clearCookies(ctx.res);
24}

Callers

nothing calls this directly

Calls 2

clearCookiesFunction · 0.90
patchMethod · 0.80

Tested by

no test coverage detected