auth0 / express-jwt

connect/express middleware that validates a JsonWebToken (JWT) and set the req.user with the attributes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nestjs error TS2349: This expression is not callable. jwt

evographics opened this issue · comments

Description

Following the tutorial https://www.youtube.com/watch?v=JzndSOAb6SQ from scratch, there is an error in the latest version 7.7.2.

image

Reproduction

  1. Download the repo https://github.com/Sambego/nestjs-auth0-api
  2. Run yarn to install everything
  3. Run yarn upgrade --latest to upgrade all the packages
  4. Run yarn start:dev

You can see the error lint in VSCode as well in the authorization guard file.

image

Environment

Please provide the following:

  • **Version of this library used:7.7.2
  • **Version of the platform or framework used, if applicable: NestJS 8
  • **Other relevant versions (language, server software, OS, browser):TypeScript
  • **Other modules/plugins/libraries that might be involved:jwks-rsa

Hi there, unfortunately the youtube tutorial is using express-jwt@6. This is what you will need to do in your example to use express-jwt@7:

Sambego/nestjs-auth0-api#2

just express-jwt@6.1.2 work for me