egg-jwt icon indicating copy to clipboard operation
egg-jwt copied to clipboard

JWT authentication plugin for egg

Results 15 egg-jwt issues
Sort by recently updated
recently updated
newest added

您好: 我想问一下,我有点看不懂下面的代码,还想请您解答~ ```js 'use strict'; const koajwt = require('koa-jwt2'); module.exports = options => { return koajwt(options); }; ``` 另外,我向你的index.d.ts提交了PR,您可以顺便看一下~

https://github.com/okoala/egg-jwt/blob/22400fed34e0763f639cc660c7a4a2e79f58e9c7/index.d.ts#LL32C37-L32C37 this.app.jwt.decode(token) -> any or object ?

如题, 那么设置app.config.jwt.secret 的意义是什么? const jwtcode = app.jwt.sign({ uid: 1111 }, app.config.jwt.secret); 这样加工后返回的jwt code 可以在以下工具解密: https://www.box3.cn/tools/jwt.html

```javascript config.jwt = { expire: 7200, secret: 'b2ce49e4a541068d', }; ``` I watch [node-jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) docs, But I found set to token expire time attribute name should is `expiresIn`?