Reputation: 1
I am learning to use middlewares and as I am trying to import express-jwt it does not work. I am using the following syntax: const expressJwt = require('express-jwt')
I uninstalled express-jwt and installed an older version [email protected], in which it works, but I wanna know how to fix it on the new version.
Upvotes: 0
Views: 615
Reputation: 15
//protection API and Authentication JWT middleware
const expressJwt = require('express-jwt')
function authJwt() {
const secret = process.env.secret;
function expressJwt(param) {
return undefined;
}
have the same problem
return expressJwt({
secret,
algorithms: ['HS256']
})
}
module.exports = authJwt;
Upvotes: 0