使用常规的Firebase auth ID令牌,我们可以使用https://www.googleapis.com/service_accounts/v1/jwk/securetoken@system.gserviceaccount.com
如果您改为制作会话Cookie,则颁发者所在的位置https://session.firebase.google.com/,JWK位于哪个URL?
公共证书在这里:
https://www.googleapis.com/identitytoolkit/v3/relyingparty/publicKeys
每个证书都采用PEM格式。从证书中提取公钥,并在验证JWT标头和有效负载后验证签名。JWT标头kid将告诉您要使用哪个证书。
谷歌提供了一个API,你可以调用它来获取会话cookie的JWK:
方法:getSessionCookiePublicKeys