使用来自 CICP/Firebase 身份验证的访问令牌时,未配置返回 JWT 颁发者的 Cloud Endpoints 身份验证

使用来自 CICP/Firebase 身份验证的访问令牌时,未配置返回 JWT 颁发者的 Cloud Endpoints 身份验证

问题描述:

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

Right now my OpenAPI yaml looks like this:

我的 JWT 中的原始格式的访问令牌如下所示:

And my Access Token coming out of my JWT in raw format looks like this:

Google-Issuer 和 JWT iss 完全相同,JWT Kid 匹配 google-jwks_uri 提供的链接内的 key id,而 google-audiences 匹配 aud.所以,真的,我不能看看为什么这不起作用,但是当我使用不记名访问令牌调用 api 时,我收到 401 和Jwt 颁发者未配置".

The Google-Issuer and the JWT iss are the exact same, the JWT kid matches the key ids inside the link provided by the google-jwks_uri, and the google-audiences match the aud.So, really, I can't see why this wouldn't work, and yet when i call the api with the Bearer access token i receive a 401 and "Jwt issuer is not configured".

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

@BryceSoker I ran into a similar problem and found that changing

x-google-issuer:https://accounts.google.com"到x-google-issuer:accounts.google.com"

x-google-issuer: "https://accounts.google.com" to x-google-issuer: "accounts.google.com"

匹配 ID 令牌中的iss":accounts.google.com"解决了问题.

to match the "iss": "accounts.google.com" in the ID token fixed the problem.