PHP code example of kirschbaum-development / laravel-socialite-cognito

1. Go to this page and download the library: Download kirschbaum-development/laravel-socialite-cognito library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kirschbaum-development / laravel-socialite-cognito example snippets


'cognito' => [
    'base_uri' => env('COGNITO_URI'),
    'client_id' => env('COGNITO_CLIENT_ID'),
    'client_secret' => env('COGNITO_CLIENT_SECRET'),
    'redirect' => env('COGNITO_REDIRECT_URI'),
],

$user = Socialite::driver('cognito')->user();

$scopes = [
    'openid',
    'profile',
    'aws.cognito.signin.user.admin',
];