
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
visanduma/nova-two-factor
Advanced tools
Laravel nova in-dashboard 2FA security feature.
Setup 2FA

Enable/Disable feature

Nova login screen with 2FA security

Reauthorize any route using 2FA prompt

Install the package
composer require visanduma/nova-two-factor
php artisan vendor:publish --provider="Visanduma\NovaTwoFactor\ToolServiceProvider"
Change configs as your needs
return [
// defaults to app.name when null
'display_name' => null,
// enable or disable 2FA feature. default is enabled
'enabled' => env('NOVA_TWO_FA_ENABLE',true),
// name of authenticatable entity table. usually - users
'user_table' => 'users',
// Entity primary key
'user_id_column' => 'id',
// authenticatable model class
'user_model' => \App\Models\User::class
/* Change visibility of Nova Two Fa menu in right sidebar */
'showin_sidebar' => true,
'menu_text' => 'Two FA',
'menu_icon' => 'lock-closed',
/* Exclude any routes from 2fa security */
'except_routes' => [
//
],
/**
* reauthorize these urls before access, withing given timeout
* you are allowed to use wildcards pattern for url matching
**/
'reauthorize_urls' => [
// 'resources/users/new',
// 'resources/users/*/edit',
],
/* timeout in minutes */
'reauthorize_timeout' => 5,
/* QR code can be generate using online API or inbuilt 'BaconQrCode' package*/
'use_offline_qr' => false,
];
<?php
namespace App\Models;
use Visanduma\NovaTwoFactor\ProtectWith2FA;
class User extends Authenticatable{
use ProtectWith2FA;
}
/*
|--------------------------------------------------------------------------
| Nova Route Middleware
|--------------------------------------------------------------------------
|
| These middleware will be assigned to every Nova route, giving you the
| chance to add your own middleware to this stack or override any of
| the existing middleware. Or, you can just stick with this stack.
|
*/
'middleware' => [
...
\Visanduma\NovaTwoFactor\Http\Middleware\TwoFa::class
],
<?php
class NovaServiceProvider extends NovaApplicationServiceProvider{
public function tools()
{
return [
...
new \Visanduma\NovaTwoFactor\NovaTwoFactor()
];
}
}
php artisan migrateFAQs
Nova Two Factor Authentication
The composer package visanduma/nova-two-factor receives a total of 1,055 weekly downloads. As such, visanduma/nova-two-factor popularity was classified as popular.
We found that visanduma/nova-two-factor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.