sepehrcorefinity / google2fa-visanduma
Nova Two Factor Authentication
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/sepehrcorefinity/google2fa-visanduma
Requires
- php: >=7.1.0
- bacon/bacon-qr-code: ^2.0
- pragmarx/google2fa-laravel: ^2.0
This package is not auto-updated.
Last update: 2025-10-12 18:15:21 UTC
README
Laravel nova in-dashboard 2FA security feature
- pubish config & migration
php artisan vendor:publish --provider="Visanduma\NovaTwoFactor\ToolServiceProvider"
Change configs as your needs
return [
'enabled' => env('NOVA_TWO_FA_ENABLE',true),
'user_table' => 'users',
'user_id_column' => 'id',
'user_model' => \App\Models\User::class
];
- use ProtectWith2FA trait in user model
use ProtectWith2FA
- add TwoFa middleware to nova config file
\Visanduma\NovaTwoFactor\Http\Middleware\TwoFa::class
- register NovaTwoFactor tool in Nova Service Provider
new \Visanduma\NovaTwoFactor\NovaTwoFactor()
- run php artisan migrate
- You are done !