Security Auth - v1.0.0
Installation
Install via Composer
composer require artisanpack-ui/security-auth
Auto-registers via Laravel's package discovery.
Run migrations
php artisan migrate
Three migration groups:
add_two_factor_to_users_table— addstwo_factor_secret,two_factor_recovery_codes,two_factor_enabled_atcolumns to the existinguserstablepassword/— adds password security columns tousers+ createspassword_historyauthentication/— createsuser_sessionsandaccount_lockouts
Prerequisite: a standard Laravel
userstable must exist before these migrations run. Run Laravel's default migrations first.
(Optional) Publish the config
php artisan vendor:publish --tag=security-auth-config
Lives at config/artisanpack/security-auth.php. Override 2FA provider, password policy thresholds, lockout durations, session bindings here.
Add the trait
use ArtisanPackUI\SecurityAuth\TwoFactor\TwoFactorAuthenticatable;
class User extends Authenticatable
{
use TwoFactorAuthenticatable;
}