摘要: https://zhuanlan.zhihu.com/p/37997035 阅读全文
posted @ 2024-03-16 20:49 anch 阅读(1) 评论(0) 推荐(0) 编辑
摘要: [ uuid ] https://www.npmjs.com/package/uuid#api-summary npm i uuid const {v4 uuidv4} = require('uuid') // v1 v3 v4 v5 const id = uuidv4() 还可以进行格式化,解析, 阅读全文
posted @ 2024-03-16 20:35 anch 阅读(1) 评论(0) 推荐(0) 编辑
摘要: [ jsonwebtoken ] token 令牌,注册时生成,登陆验证通过后下发 // install npm install jsonwebtoken // 生成 const token = 'Bearer ' + jwt.sign({userid: 1}, secret) // secret 阅读全文
posted @ 2024-03-16 16:10 anch 阅读(2) 评论(0) 推荐(0) 编辑