Skip to content
 
 

Repository files navigation

nova-two-factor

Forked from https://github.com/Visanduma/nova-two-factor

It's almost identical to v1 of said repository (which is Nova 3 compatible), with a fix for local QR code generation and a few visual tweaks.

  1. Publish config & migration php artisan vendor:publish --provider="Visanduma\NovaTwoFactor\ToolServiceProvider"
return [
    'enabled' => env('NOVA_TWO_FA_ENABLE',true),
    'user_table' => 'users',
    'user_id_column' => 'id',
    'user_model' => \App\Models\User::class,
    '2fa_model' => \Visanduma\NovaTwoFactor\Models\TwoFa::class,
];
  1. Use ProtectWith2FA trait in User model

    use ProtectWith2FA

  2. Add TwoFa middleware to Nova config file

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

  3. Register NovaTwoFactor tool in Nova Service Provider

    new \Visanduma\NovaTwoFactor\NovaTwoFactor()

  4. Run php artisan migrate

  5. You are done!

Credits

About

Laravel nova in-dashboard 2FA feature

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages