const expressJwt = require('express-jwt')
function authJwt(){
const secret= process.env.secret;
return expressJwt({
secret,
algorithms: ['HS256']
})
}
module.exports = authJwt;
i tried replacing expressJwt with {expressJwt},{expressjwt:expressJwt} and other solution given earlier. I also tried a version older than 7 but it also didn't work.