找不到信封的pem:{“ alg”:“ RS256”,“ kid”:“ 5a66482db3800c83c63”,“ typ”:“ JWT”}

问题描述 投票:0回答:1

我正在尝试验证和解码前端发送的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();
node.js reactjs jwt google-oauth2
1个回答
0
投票

我遇到了同样的问题。...使用的是我在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));
  }

但是我不知道那是什么意思。

© www.soinside.com 2019 - 2024. All rights reserved.