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
demandé il y a 6 ans1220 vues
1 réponse
0
Réponse acceptée

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
EXPERT
répondu il y a 6 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions