pmill / aws-cognito

A PHP library for AWS Cognito user pools
MIT License
74 stars 62 forks source link

Invalid Security Token #16

Closed shitalpimpale closed 5 years ago

shitalpimpale commented 5 years ago

For Login API getting below error :

Uncaught exception 'Aws\CognitoIdentityProvider\Exception\CognitoIdentityProviderException' with message 'Error executing "AdminInitiateAuth" on "https://cognito-idp.us-east-1.amazonaws.com"; AWS HTTP error: Client error: POST https://cognito-idp.us-east-1.amazonaws.com resulted in a 400 Bad Request response: {"type":"UnrecognizedClientException","message":"The security token included in the request is invalid."} UnrecognizedClientException (client): The security token included in the request is invalid. - {"type":"UnrecognizedClientException","message":"The security token included in the request is invalid."}' GuzzleHttp\Exception\ClientException: Client error: POST https://cognito-idp.us-east-1.amazonaws.com resulted in a 400 Bad Request response: {"__type":"UnrecognizedClientException","message":"The security token included in the request is invalid."}

I believe my config setting is correct.

bjoernHeneka commented 5 years ago

Hey @shitalpimpale maybe you can post your config here and add some more information about what you did.

pmill commented 5 years ago

@JPOyarzunA I've deleted your comment as it contains your app_client_id and app_client_secret.

pmill commented 5 years ago

@shitalpimpale after a google all I can say is ensure that your credentials are correct for the client id and user pool id that you are using.