QuickAuth is user authentication extension for Catalyst Sentinel package.
QuickAuth is extension for Sentinel package that can be found here.
With QuickAuth you can setup user authentication in few minutes!, (*1)
Before installation, make sure these packages are correctly set up. - Catalyst Sentinel - Laravel Collective Forms & HTML, (*2)
$ composer require "plexcellmedia/quickauth"
After installing the package, open your Laravel config file located at config/app.php and add the following lines., (*3)
In the $providers array add the following service provider for this package., (*4)
Plexcellmedia\QuickAuth\QuickAuthServiceProvider::class,
In the $aliases array add the following facades for this package., (*5)
'Input' => Illuminate\Support\Facades\Input::class, 'QuickAuth' => Plexcellmedia\QuickAuth\Facades\QuickAuth::class,
Publish assets., (*6)
php artisan vendor:publish --provider="Plexcellmedia\QuickAuth\QuickAuthServiceProvider"
Add following line to $routeMiddleware array in Kernel.php, (*7)
'sentinel.auth' => \App\Http\Middleware\SentinelAuth::class,
Setup routes, (*8)
/** QuickAuth Routes */ // Login routes Route::get('/login', 'QuickAuth\LoginController@showLogin')->name('quickauth.login.show'); Route::post('/login', 'QuickAuth\LoginController@doLogin')->name('quickauth.login.do'); // Register routes Route::get('/register', 'QuickAuth\RegisterController@showRegister')->name('quickauth.register.show'); Route::post('/register', 'QuickAuth\RegisterController@doRegister')->name('quickauth.register.do'); // Activate user route Route::get('/activate/{userId}/{code}', 'QuickAuth\ActivateController@doActivate')->name('quickauth.activate.do'); // Password recovery routes Route::get('/forgot', 'QuickAuth\ForgotController@showForgot')->name('quickauth.forgot.show'); Route::post('/forgot', 'QuickAuth\ForgotController@doForgot')->name('quickauth.forgot.do'); Route::get('/verify/{email}/{code}', 'QuickAuth\ForgotController@verifyForgot')->name('quickauth.forgot.verify'); // Auth protected routes Route::group(['middleware' => ['sentinel.auth']], function () { Route::get('/logout', 'QuickAuth\LogoutController@doLogout')->name('quickauth.logout.do'); });
Enter login success redirect route in QuickAuth config., (*9)
'login_success_route' => '',
DONE, (*10)
Run SQL query to add username field at database., (*11)
ALTER TABLE `users` ADD `username` VARCHAR(64) AFTER `email`, ADD UNIQUE (`username`);
Enable username support in config., (*12)
'username_support' => true,
Layouts and template can be found at resources\views\vendor\quickauth
., (*13)
Translations can be found at resources\lang\vendor\quickauth
., (*14)
GPL-3.0, (*15)