koa2-jwt-simple Install npm install koa2-jwt-simple Usage const Koa = require('koa') const jwt = require('koa2-jwt-simple') const app = new Koa() app.use(jwt({ secret: '生成token时的密匙', error: { code: 4008, msg: '登录失效' } }).unless({ path: [/\/api\/register/, /\/api\/login/] }))