A middleware to verify your nodejs express api with jwt token
$ npm install api-guard-with-jwt
const guard = require('api-guard-with-jwt')
Use Globally
app.use(guard.verify('shhhhh'))
app.use('/users', usersRouter);
Use Single
router.get('/',[guard.verify('shhhhh')], async function(req, res, next) {});
Note
: here 'shhhh' is a token secrect key
- jsonwebtoken
This project is licensed under the MIT license. See the LICENSE file for more info.