My problem: request.session is undefined in my Nes...
# support-questions-legacy
j
My problem: request.session is undefined in my NestJS middleware. What is responsible for adding the session to the Request object (thus turning it into a supertokens SessionRequest)? The supertokens middleware? EDIT: Does not seem to be the middleware. But anyway, I can get the session with getSession(). I still don't know how it later (in controllers) becomes available directly in request.session. Maybe it's the ctx.switchToHttp().getRequest() that does the magic?
r
Hey. The verifySession middleware does that.
4 Views