从CICP / Firebase Auth使用访问令牌时,未配置返回JWT Issuer的Cloud Endpoints Auth

时间:2020-04-29 16:48:02

标签: firebase-authentication jwt access-token google-cloud-endpoints

现在我的OpenAPI yaml看起来像这样:

enter image description here

从我的JWT中以原始格式发出的访问令牌看起来像这样:

enter image description here

Google-Issuer和JWT iss完全相同,JWT kid匹配google-jwks_uri提供的链接内的密钥ID,而google-audits匹配aud。所以,实际上,我不能看看为什么这行不通,但是当我使用Bearer访问令牌调用api时,会收到401,并且“未配置Jwt颁发者”。

1 个答案:

答案 0 :(得分:0)

@BryceSoker我遇到了类似的问题,发现改变了

x-google-issuer:“ https://accounts.google.com” 至 x-google-issuer:“ accounts.google.com”

匹配ID令牌中的“ iss”:“ accounts.google.com”,即可解决问题。