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

v1.0.0 2024-06-01 06:09 UTC

This package is not auto-updated.

Last update: 2025-10-12 18:15:21 UTC


README

Laravel nova in-dashboard 2FA security feature

  1. 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

];

  1. use ProtectWith2FA trait in user model

use ProtectWith2FA

  1. add TwoFa middleware to nova config file

\Visanduma\NovaTwoFactor\Http\Middleware\TwoFa::class

  1. register NovaTwoFactor tool in Nova Service Provider

new \Visanduma\NovaTwoFactor\NovaTwoFactor()

  1. run php artisan migrate
  2. You are done !