Skip to content

Cognito - On signin it give this error: Error executing "AdminInitiateAuth" on "https://cognito-idp.eu-west-1.amazonaws.com"; #2729

Discussion options

You must be logged in to vote

@marioruimelo, thanks for this information. If credentials are temporary then, you need to provide the token parameter to the credential object.
Example:

 * Initialize the Cognito Identity Provider Client
     */
    private function _initialize()
    {
        $this->_cognito = new CognitoIdentityProviderClient([
            'region' => $_ENV['AWS_REGION'],
            'version' => $_ENV['AWS_VERSION'],
            'credentials' => array(
                'key' => $_ENV['AWS_ACCESS_KEY_ID'],
                'secret'  => $_ENV['AWS_SECRET_ACCESS_KEY'],
                'token' => "YOUR_TOKEN"
            )
        ]);
    }

Please make sure you replace the YOUR_TOKEN with the correct token …

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@marioruimelo
Comment options

@yenfryherrerafeliz
Comment options

@marioruimelo
Comment options

@yenfryherrerafeliz
Comment options

Answer selected by marioruimelo
@marioruimelo
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
2 participants