import { Injectable } from "@nestjs/common" ; import { AuthGuard } from "@nestjs/passport" ; @ Injectable ( ) export class JwtAuthGuard extends AuthGuard ( "jwt" ) { } export class OptionalJwtAuthGuard extends JwtAuthGuard { handleRequest < T > ( _err , user ) { return user ; } }