Is there anyway to access Session info in middlewa...
# support-questions-legacy
a
Is there anyway to access Session info in middleware level without using decorator in controller?
Copy code
import { Request, Response, NextFunction } from 'express';
import { SessionContainer } from 'supertokens-node/recipe/session';

export async function AuthInfoMiddleware(
  req: Request,
  res: Response,
  next: NextFunction,
  ) {
    const session: SessionContainer = req['session']; 

  next();
}
NESTJS