Security Auth
Authentication security for Laravel: two-factor auth over email and TOTP, password complexity rules, HaveIBeenPwned breach checking, password history, account lockout, advanced session management and step-up authentication.
v1.0.1
MIT License
★ 0
composer require artisanpack-ui/security-auth
$ composer require artisanpack-ui/security-auth
✓ Installed
$ php artisan migrate
✓ Added 2FA columns, session & lockout tables
use TwoFactorAuthenticatable;
What it does
Harden the login flow
Two-factor, password policy, lockout and session controls with shipped Livewire components \u2014 the auth-hardening layer of the Security 2.0 restructure.
Two-factor auth
Email and Google2FA TOTP, a TwoFactorAuthenticatable trait and recovery codes.
Password security
Complexity rules, HaveIBeenPwned breach checks, history and expiration — as drop-in rules.
Account lockout
User- and IP-level lockouts with configurable durations and failed-attempt tracking.
Session management
IP/UA bindings, concurrent session limits, rotation and programmatic termination.
Step-up auth
step-up middleware to require a fresh credential challenge before sensitive routes.
Livewire components
Password strength meter, lockout status, session manager and step-up modal.
Get started
Install and migrate
Add the TwoFactorAuthenticatable trait to your User model, then validate passwords with the composite PasswordPolicy rule.
1 · Install
composer require artisanpack-ui/security-auth
2 · Run migrations
php artisan migrate
3 · Publish config (optional)
php artisan vendor:publish --tag=security-auth-config
Requirements
What you need
| Requirement | Detail |
|---|---|
| PHP | 8.2+ |
| Laravel | 10, 11, 12 or 13 |
| TOTP | pragmarx/google2fa-laravel (pulled in automatically) |
| The bundled migrations assume the standard Laravel users table — run Laravel's default migrations first. | |
Secure your logins with Security Auth
Two-factor, password policy, lockout and session management in one command. Free and open source under the MIT license.
