Click in order · NestJS course · Module 4: Authentication

Middleware vs Guard in Authentication

Arrange the order of execution of layers in an HTTP request with authentication

Items to click

  • Middleware (e.g., CORS, logging)
  • Controller (request handling)
  • Guard (e.g., JwtAuthGuard)
  • Pipe (e.g., DTO validation)
  • Interceptor (e.g., data transformation)

You can check the correct answer by solving this task in the CodeWorlds game.