Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
495 views
in Technique[技术] by (71.8m points)

express搭建的后端项目生成token时报错

生成token用的是jwt.sign(), 通过读取私钥文件和公钥文件来创建jwt的秘钥。
文件目录:
image
然后私钥文件(private.key)是这样的:
image
公钥文件(public.key)是这样的:
image
创建的token的代码是这样的:
image
但是有时候就会报这个错:
image
有大佬知道怎么解决吗~~~~


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

image.png
这两部分内容好像不需要吧。。。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...