A custom AWS Cognito driver for Laravel Socialite
kirschbaum-development/laravel-socialite-cognito is a Laravel package for a custom aws cognito driver for laravel socialite.
It currently has 7 GitHub stars and 65 downloads on Packagist (latest version 0.0.1).
Install it with composer require kirschbaum-development/laravel-socialite-cognito.
Discover more Laravel packages by kirschbaum-development
or browse all Laravel packages to compare alternatives.
Last updated
This package is a custom AWS Cognito driver for Laravel Socialite.
You can install the package via composer:
composer require kirschbaum-development/laravel-socialite-cognito
Once you install the package, add the next config values in you config/services.php configuration file:
'cognito' => [
'base_uri' => env('COGNITO_URI'),
'client_id' => env('COGNITO_CLIENT_ID'),
'client_secret' => env('COGNITO_CLIENT_SECRET'),
'redirect' => env('COGNITO_REDIRECT_URI'),
],
Then, you can use the driver as you would use it in the Laravel Socialite's official documentation. Use cognito keyword when you want to instantiate the driver:
$user = Socialite::driver('cognito')->user();
The default scopes are:
$scopes = [
'openid',
'profile',
'aws.cognito.signin.user.admin',
];
You can add more scopes or override the default ones by using scopes or setScopes methods like the official documentation shows (link)
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] or [email protected] instead of using the issue tracker.
Development of this package is sponsored by Kirschbaum Development Group, a developer driven company focused on problem solving, team building, and community. Learn more about us or join us!
The MIT License (MIT). Please see License File for more information.