skweb-express-jwt
v5.0.0
Published
express-jwt together with a sign method. Supports Keycloak/Auth0 via jwks-rsa.
Downloads
684
Readme
skweb-express-jwt
JWT utilities for Express applications.
Installation
npm install skweb-express-jwtUsage
const JWT = require('skweb-express-jwt')
const jwt = new JWT({
secret: 'your-secret-key',
algorithms: ['HS256']
})
// Sign a token
const token = jwt.sign({ userId: 123 })
// Verify a token
const decoded = jwt.verify(token)
// Use as middleware
app.use(jwt.midware)License
MIT
