Put in order · NestJS course · Module 4: Authentication

validate() syntax in JwtStrategy

Arrange the syntax of the validate method in JwtStrategy from async to returning the object

Items to put in order

  • payload: JwtPayload) {
  • async validate(
  • return { userId: payload.sub, username: payload.username }; }

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