Reputation: 13
We are trying to implement Amazon Cognito services for user authentication with our built in laravel 5.1 application. We are looking for a composer package for laravel 5.1 that allow to Amazon Cognito User Pools, registering user's into User Pools, password resets etc.
Upvotes: 1
Views: 3620
Reputation: 699
This question is quite old, but for someone looking for such package check this out, I think this is what you need
https://github.com/black-bits/laravel-cognito-auth
Upvotes: 1
Reputation: 2452
You can use AWS SDK for PHP using Composer. See the following quoted steps of this guide.
- Open a terminal window and navigate to the directory where your project is stored. Composer is installed on a per-project basis.
Download and install Composer in your project directory. If you have
curl
installed, you can use the following command:curl -sS https://getcomposer.org/installer | php
When the installation script finishes, a
composer.phar
file will be created in the directory where you ran the installer.Create a file at the root level of your project called composer.json and add the following dependency for the AWS PHP SDK:
{ "require": { "aws/aws-sdk-php": "2.*" } }
Install the dependencies by running Composer's install command:
php composer.phar install
This will create a
vendor
directory in your project with the required libraries and an autoloader script used to load them for your project.Require Composer's autoloader by adding the following line to your code's bootstrap process (typically in
index.php
):require '/path/to/sdk/vendor/autoload.php';
Your code is now ready to use the AWS SDK for PHP!
AWS has added Cognito User Pools management in Version 3.32.7. You may have a look at AWS Service Provider for Laravel as well for more information.
Upvotes: 1