我正在尝试验证和解码前端发送的ID令牌。运行verifyfunction时出现此错误。有时可能会起作用。
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));
}
但是我不知道那是什么意思。