steelants / laravel-auth
Laravel Auth
1.1.7
2026-03-10 11:50 UTC
Requires
- endroid/qr-code: ^6.1
- laravel/framework: ^11.0|^12.0
Requires (Dev)
- barryvdh/laravel-debugbar: ^3.9
- orchestra/testbench: ^7.0|^8.0|^9.0
- phpunit/phpunit: ^9.3|^10.4
- slevomat/coding-standard: ^8.19
- squizlabs/php_codesniffer: ^4.0
README
Currently WIP
Created by: SteelAnts s.r.o.
Install
- Artisan Command
install:auth
- add routes to web.php
Route::auth();
Optional Features
*Both features are disabled by default to avoid route collisions.
Email verification
- Protects routes with the
verifiedmiddleware and provides notice/verify/resend endpoints when enabled. - Requires
Route::auth(['verify' => true]);and theHandlesEmailVerificationplugin trait added to yourAuthControllernext toAuthentication.
MFA (TOTP)
- Adds TOTP setup/verification screens and enforces checks via the
verified.totpmiddleware. - Requires
Route::auth(['totp' => true]);and theHandlesTotpplugin trait added to yourAuthControllernext toAuthentication. - Install QR dependency in your app:
composer require endroid/qr-code.
Auth controller setup
Your AuthController pulls in the core auth trait, plus the plugin traits for optional features:
use SteelAnts\LaravelAuth\Traits\Authentication; use SteelAnts\LaravelAuth\Traits\HandlesEmailVerification; use SteelAnts\LaravelAuth\Traits\HandlesTotp; class AuthController extends Controller { use Authentication; use HandlesEmailVerification; // enable email verification flows use HandlesTotp; // enable TOTP MFA flows }
Development
-
Create subfolder
/packagesat root of your laravel project -
clone repository to sub folder
/packages(you need to be positioned at root of your laravel project in your terminal)
git clone https://github.com/steelants/laravel-auth.git ./packages/laravel-auth
- edit composer.json file
"autoload": { "psr-4": { "SteelAnts\\LaravelAuth\\": "packages/laravel-auth/src/" } }
- Add provider to
bootstrap/providers.php
return [ ... SteelAnts\LaravelAuth\AuthServiceProvider::class, ... ];
- aplicate packages changes
php artisan install:auth --force