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 41 forks source link

V1.3.0 NoLocalUserException when trying to login. #108

Open RubinNederlof opened 1 month ago

RubinNederlof commented 1 month ago

Describe the bug When using version V1.2.5 everything worked perfectly. After running composer update and switching to version V1.3.0 I get the NoLocalUserException from 'src/Guards/Traits/BaseCognitoGuard.php:244' while the user does exist in AWS Cognito and the local user table.

To Reproduce Steps to reproduce the behaviour:

  1. Follow the readme to install the package
  2. Create the login controller according to the screenshot included.
  3. Register and activate a user in AWS Cognito and the local database.
  4. Call the API
  5. See the error

Expected behaviour Get the user to be logged in.

Screenshots image image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context 'src/Guards/Traits/BaseCognitoGuard.php:223': The '$credentials' param contains a collection of a 'sub' key with a token as a value. The line '$this->getRemoteUserData($this->claim->getUsername());' (R231) returns an error that the user doesn't exist.