This is a quick post to point out a potential issue that might catch you out with using Fastify’s sessions mechanism alongside tRPC’s websockets transport, and how I’ve fixed it in my projects. The problem happens with an application that looks something like this: const app = Fastify(); app.register(ws); app.register(fastifyCookie); app.register(fastifySession, { secret: "..." }); app.register(fastifyTRPCPlugin, { prefix: "/trpc", useWSS: true, trpcOptions: { router, onError, createCon...