#How can I apply multiple guards using APP_GUARD on root module?

2 messages · Page 1 of 1 (latest)

stone nacelle
#

I want to apply two of guards to root module for global guard
likes this:

@Module({
  providers: [
    { 
      provide: APP_GUARD,
      useClass: <- I want to use JwtGuard and RoleGuard
    }
  ]
})
export class RootModule  {}

I know @UseGuards([JwtGuard, RoleGuard]), but it can't use on APP_GUARD
How can I combine both of guards for global?

sharp belfry
#

Use APP_GUARD in multiple providers