📜  创建 jwt 令牌打字稿代码示例

📅  最后修改于: 2022-03-11 14:48:29.303000             🧑  作者: Mango

代码示例1
//The recommended way is to generate your token on the serverside, anyway:
npm install jsonwebtoken --save
npm install @types/jsonwebtoken --save

import * as jwt from 'jsonwebtoken';

let token = jwt.sign({ anyObject: 'here..' }, 'your super secret password!!');