Question · NestJS course · Module 4: Authentication

ExtractJwt method

What does ExtractJwt.fromAuthHeaderAsBearerToken() do in JwtStrategy?

Answer options

  • Generates a new JWT token
  • Encrypts the token before sending
  • Saves the token in the database
  • Extracts the JWT token from the Authorization header of type Bearer

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