为什么在 oauth 端点有两个证书?

Why are there two certificates at the oauth endpoint?

如果只需要一个密钥来验证 JWT 的签名,为什么 endpoint to retrieve the JWK encoded keys 处有两个证书?

这些是我找到端点的说明:https://developers.google.com/identity/gsi/web/guides/verify-google-id-token

由授权服务器决定他们使用多少密钥。如您所见,定义了两个密钥,每个密钥都有一个唯一的密钥 ID (kid)。根据范围、客户端类型、密钥轮换等多个标准,每个密钥可能有一个专用目的。

返回的 JWT 包含一个属性 kid,它指定使用哪个密钥进行签名。如果你验证的是JWT签名,你必须使用孩子从JWT中识别出的密钥。