title: User is undefined on the context.switchToHttp().getRequest() nestjs
body: <p>I'm new to nestJs and I needed to add role based access to the application so I followed the documentation but in the execution context user doesn't exist. I can't seems to find the problem here's the github repo if you need to seem more code: <a href="https://github.com/anjula-sack/slinc-backend" rel="nofollow noreferrer">https://github.com/anjula-sack/slinc-backend</a></p>
  <p><strong>roles.guard.ts</strong></p>
  <pre><code>import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common';
  import { Reflector } from '@nestjs/core';
  import { ROLES_KEY } from 'src/decorators/roles.decorator';
  import Role from 'src/util/enums/role.enum';
  
  @Injectable()
  export class RolesGuard implements CanActivate {
    constructor(private reflector: Reflector) {}
  
    canActivate(context: ExecutionContext): boolean {
      const requiredRoles = this.reflector.getAllAndOverride&lt;Role[]&gt;(ROLES_KEY, [
        context.getHandler(),
        context.getClass(),
      ]);
      if (!requiredRoles) {
        return true;
      }
      const { user } = context.switchToHttp().getRequest();
      console.log(context.switchToHttp().getRequest().req);
  
      return requiredRoles.some((role) =&gt; user.type === role);
    }
  }
  </code></pre>
  <p><strong>app.controller.ts</strong></p>
  <pre><code>  @UseGuards(JwtAuthGuard, RolesGuard)
    @Get('me/business')
    @Roles(Role.ADMIN)
    getBusiness(@Request() req) {
      return this.usersService.getUserBusiness(req.user.id);
    }
  </code></pre>