Cognito IdP: Include "nonce" token in "id_token"

0

We are using Cognito as an IdP. Therefore, users are managed in user pools. For login, we are not using the Hosted UI but instead have build our own custom UI because of customisation requirements. For doing the actual login, we are using the Cognito IdP Actions like AdminInitiateAuth, etc.

We need to integrate this setup with Keycloak. Keycloak is initiating an OAuth2 Flow in which we are showing our login form, perform the login and provide the tokens.

The problem is that Keycloak is sending an "nonce" token when calling the AUTHORIZATION endpoint and expects this "nonce" token to be present in the "id_token" which it receives after successful authentication. With the Cognito Hosted UI this works like expected. However, when using the Cognito IdP API we have not found any way to provide this information as a parameter to have the "nonce" token included in the "id_token".

Are we missing something? What's the right way to do this? Any help is highly appreciated.

Thanks in advance

已提問 2 年前檢視次數 354 次
1 個回答
0

Hi,

the usage of AWS SDK and AdminIntiateAuth/InitiateAuth does not allow the providing of a nonce as the per the issuance of the JWTs.

Jeff

AWS
已回答 1 年前

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

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

回答問題指南