superMrToast
superMrToast
TTCTheo's Typesafe Cult
Created by superMrToast on 9/23/2024 in #questions
Signing Out from client side - not removing session from DB
I can see the authRouter signOut function here in pacakges/api/src/router/auth.ts export const authRouter = { getSession: publicProcedure.query(({ ctx }) => { return ctx.session; }), getSecretMessage: protectedProcedure.query(() => { return "you can see this secret message!"; }), signOut: protectedProcedure.mutation(async (opts) => { if (!opts.ctx.token) { return { success: false }; } await invalidateSessionToken(opts.ctx.token); return { success: true }; }), } satisfies TRPCRouterRecord; but dont know why it acts differently
3 replies