ellaisys / aws-cognito

AWS Cognito package (with MFA Feature) using the AWS SDK for PHP/Laravel
https://ellaisys.github.io/aws-cognito/
MIT License
110 stars 43 forks source link

InvalidSignatureException #2

Closed rehans90 closed 2 years ago

rehans90 commented 3 years ago

Hi, Registration works fine but when I try to get login I am getting the below error. Can you please guide is there anything I am missing? { "status": "error", "message": { "headers": {}, "original": { "error": "InvalidSignatureException", "message": "InvalidSignatureException" }, "exception": null } }

rehans90 commented 3 years ago

After following the IAM User Roles creation steps I have recreated the access key. I get the below error now. Please help { "status": "error", "message": { "headers": {}, "original": { "error": "UnrecognizedClientException", "message": "UnrecognizedClientException" }, "exception": null } }

diptajit-techpro commented 3 years ago

You need to save the user details, specially username, password, in your local Database under table name 'users'. I have also got into this issue, solved by this. Now I am getting accesstoken, expire_time, type, refresh_token and IdToken.

amitdhongde commented 3 years ago

You need to save the user details, specially username, password, in your local Database under table name 'users'. I have also got into this issue, solved by this. Now I am getting accesstoken, expire_time, type, refresh_token and IdToken.

You need to have the username in DB and Cognito to be alike. You should avoid storing passwords in DB, as Cognito manages the same for you.

amitdhongde commented 2 years ago

Read me is updated. Added a working code with a demo link.