Open tufcoder opened 1 year ago
Pessoal, estava tendo um problema com o módulo express-jwt na versão maior que 7.6.0. Ficava dando uma mensagem que o tipo do secret (GetVerificationKey) não era o esperado.
Segue os links sobre a solução do problema:
Refatorando o código ficou assim:
import { expressjwt as jwt, GetVerificationKey } from 'express-jwt'; const checkJWT = promisify( jwt({ secret: expressJwtSecret({ cache: true, rateLimit: true, jwksRequestsPerMinute: 5, jwksUri: `${this.AUTH0_DOMAIN}.well-known/jwks.json`, }) as GetVerificationKey, audience: this.AUTH0_AUDIENCE, issuer: this.AUTH0_DOMAIN, algorithms: ['RS256'], }), );
Pessoal, estava tendo um problema com o módulo express-jwt na versão maior que 7.6.0. Ficava dando uma mensagem que o tipo do secret (GetVerificationKey) não era o esperado.
Segue os links sobre a solução do problema:
Refatorando o código ficou assim: