PHP code example of iwouldrathercode / cognito
1. Go to this page and download the library: Download iwouldrathercode/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/ */
iwouldrathercode / cognito example snippets
..
..
'defaults' => [
'guard' => 'api',
'passwords' => 'users',
],
..
..
..
..
'guards' => [
..
..
'api' => [
'driver' => 'cognito',
'provider' => 'users'
]
],
..
..
POST -> api/confirm-forgot-password -> confirm-forgot-password ›
Iwouldrathercode\Cognito\Http\Controllers\SelfServiceController@confirmForgotPassword
POST -> api/forgot-password -> forgot-password › Iwouldrathercode\Cognito\Http\Controllers\SelfServiceController@forgotPassword
POST -> api/login -> signin ›
Iwouldrathercode\Cognito\Http\Controllers\LoginController@login
POST -> api/register -> signup ›
Iwouldrathercode\Cognito\Http\Controllers\RegisterController@register
POST -> api/verify -> verify ›
Iwouldrathercode\Cognito\Http\Controllers\EmailVerificationController@verify
POST -> api/logout -> signout ›
Iwouldrathercode\Cognito\Http\Controllers\LoginController@logout
bash
php artisan cognito:setup
bash
php artisan cognito:install
bash
php artisan migrate