Verify OpenId Connect token generated by Cognito Identity pool

0

I have a customer, that is using a Cognito Identity Pool in conjunction with a Cognito User Pool. He is using the Api Method GetOpenId token to generate a JWT token for an unauthenticated user and wants to verify the JWT token in the backend.

https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetOpenIdToken.html

However this seems to be possible only with tokens generated by the user pool, see:

https://aws.amazon.com/premiumsupport/knowledge-center/decode-verify-cognito-json-token/

Can the same be achieved with token from an identity pool? Where can i find the public keys used to verify the signature of the JWT?

AWS
已提问 6 年前1224 查看次数
1 回答
0
已接受的回答

I have not tried it myself, but if it is an OIDC compliant token, you should be able to verify it through the official verification process, getting the jwks url in the iss field of the token

Here is how to do it:

AWS
专家
已回答 6 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则