I have implemented Passport authentication using a JwtStrategy as described in https://docs.nestjs.com/recipes/passport, which worked great for my HTTP-based GraphQL queries and mutations. Now I have added subscriptions over websockets, and would like to extend my authentication to cover these as well. Without updating my JwtStrategy or JwtAuthGuard, I get the following error TypeError: Cannot read properties of undefined (reading 'logIn'). Does anyone have any working examples for applying Passport-based authentication to websockets/subscriptions? I am using cookie-based auth, and Fastify & Mercurius.
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).