Create iam login

1.2 2021-01-11 11:37 UTC

This package is auto-updated.

Last update: 2024-12-11 20:53:30 UTC


README

Installation

composer require alqudiry/iam

Publish

php artisan vendor:publish --provider="Alqudiry\Iam\IAMServiceProvider"

Configuration

  • Update your "auth.php" to use IAMUser class instead of User class:
  • Update credentials of IAM Site in config/iam.php
  • Update your "routes\web.php" to include this routes:
Route::group(['middleware' => ['guest']], function () {
    Route::get('/login', [\App\Http\Controllers\IAMController::class, 'login'])->name('login');
    Route::get('/validate-login', [\App\Http\Controllers\IAMController::class, 'validateLogin'])->name('validateLogin');
});

Route::group(['middleware' => ['auth']], function () {
    Route::get('/logout', [\App\Http\Controllers\IAMController::class, 'logout'])->name('logout');
});

Run the migrations