.env里面的JWT_SECRE这个怎么设置

62 阅读1分钟

我的.env如下:

image.png 我的秘钥从哪里来?

解决方案: 使用 Node.js 的 crypto 模块生成(推荐)

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

直接在控制台执行

image.png