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

Call to a member function except() on array #33

Closed danicsan closed 2 years ago

danicsan commented 2 years ago

AuthenticateUser.php line 64 sends an (array) $credentials to CreateLocalUser

  $response = $this->createLocalUser($credentials, $keyPassword);

and throw an error

  Call to a member function except() on array

as on line 98 it's trying to remove password from it

$credentials->except($keyPassword)

amitdhongde commented 2 years ago

Hi, Can you let us know the PHP and Laravel versions?

truffolone commented 2 years ago

Same problem here with php 8.1 and Laravel 9.1

you can fix at AuthenticatesUsers:93 replacing the code with

$user = $userModel::create(collect($credentials)->except($keyPassword)->toArray());

amitdhongde commented 2 years ago

The new release v1.0.7 is pushed and available for download. This issue is fixed in this release.