outl1ne/nova-two-factor
Composer 安装命令:
composer require outl1ne/nova-two-factor
包简介
Nova Two Factor Authentication
README 文档
README
Nova-Two-Factor
This Laravel Nova package adds 2FA support to the Nova dashboard.
Requirements
php: >=8.0laravel/nova: ^4.15
Screenshots
Setup 2FA
Nova login screen with 2FA security
Installation
Install the package in a Laravel Nova project via Composer and run migrations:
# Install nova-two-factor composer require outl1ne/nova-two-factor # Optionally publish the configuration and edit it php artisan vendor:publish --provider="Outl1ne\NovaTwoFactor\TwoFactorServiceProvider" --tag="config" # Run migrations php artisan migrate
Add the Has2FA trait to your configured User model.
<?php namespace App\Models; use Outl1ne\NovaTwoFactor\Has2FA; class User extends Authenticatable { use Has2FA; }
Add the TwoFa middleware to your project's Nova config file (config/nova.php).
'middleware' => [ // ... \Outl1ne\NovaTwoFactor\Http\Middleware\TwoFa::class ],
Register NovaTwoFactor tool in NovaServiceProvider file.
class NovaServiceProvider extends NovaApplicationServiceProvider{ public function tools() { return [ // ... \Outl1ne\NovaTwoFactor\NovaTwoFactor::make() ]; } }
统计信息
- 总下载量: 12.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-29


