我如何获得正确的 public 苹果登录密钥

How I can get proper public keys for apple signin

我正在尝试实现 apple 登录并从 appleid 提供商获取令牌,我发现 jwks-client 可以解决问题,但我无法获得必要的密钥。出于某种原因,它 returns 什么都不是 public 键。我需要使用什么 uri 来获取 public 密钥?

const kid = JSON.parse(header).kid;

const jwksClient = require('jwks-client');
const client = jwksClient({
    jwksUri: // what do i need to use?
});

client.getSigningKey(kid, (err, key) => {
    // no key returned
});

按照 Apple 开发门户 documentation.

上的说明尝试使用 https://appleid.apple.com/auth/keys