我正在尝试验证和解码前端发送的 id token 。
运行验证函数时出现此错误。
有时它可能会起作用。
No pem found for envelope: {"alg":"RS256","kid":"53c666482db3800c83c63","typ":"JWT"}
这是我的代码
const ticket = await client.verifyIdToken({
idToken: token,
audience: '804312674051-5o4.apps.googleusercontent.com',
});
const payload = ticket.getPayload();
最佳答案
我遇到了同样的问题......使用我从我的 reactJS 应用程序的 firebase 登录中获得的 idToken。
我在 google src 文件中发现
if (!certs.hasOwnProperty(envelope.kid)) {
// If this is not present, then there's no reason to attempt verification
throw new Error('No pem found for envelope: ' + JSON.stringify(envelope));
}
但我不知道这意味着什么。
关于node.js - 找不到信封 : {"alg" :"RS256" ,"kid" :"5a66482db3800c83c63" ,"typ" :"JWT"} 的 pem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61203872/