Cognito - On signin it give this error: Error executing "AdminInitiateAuth" on "https://cognito-idp.eu-west-1.amazonaws.com"; #2729
-
Hi, I'm getting the following error, when i try to authenticate with AdminInitiateAuth:
With InitiateAuth I have no problem, the login is done and I receive the Aws\Result Object. if I execute the following command in AWS CLI the login is also OK:
This is the code:
Can anybody give me a clue? Thanks ;) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Hi @marioruimelo, sorry to hear about your issues. This error tends to happen when using temporary credentials and the session token is either empty or invalid. I see that it is working fine in CLI, but could you please tell me which type of credential provider are you using for this request? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
@marioruimelo, thanks for this information. If credentials are temporary then, you need to provide the token parameter to the credential object.
Example:
Please make sure you replace the YOUR_TOKEN with the correct token …