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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南