在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):LifeOnScreen/nova-google2fa开源软件地址(OpenSource Url):https://github.com/LifeOnScreen/nova-google2fa开源编程语言(OpenSource Language):PHP 57.2%开源软件介绍(OpenSource Introduction):LifeOnScreen/nova-google2faThis package enforces 2FA for Laravel Nova. Upgrade from 0.0.7 to 1.0.0Upgrade guide is available Here. FlowActivation
Verification
Recovery
InstallationInstall via composer $ composer require lifeonscreen/nova-google2fa Publish config and migrations $ php artisan vendor:publish --provider="Lifeonscreen\Google2fa\ToolServiceProvider" Run migrations $ php artisan migrate Add relation to User model use Lifeonscreen\Google2fa\Models\User2fa;
...
/**
* @return HasOne
*/
public function user2fa(): HasOne
{
return $this->hasOne(User2fa::class);
} Add middleware to [
...
'middleware' => [
...
\Lifeonscreen\Google2fa\Http\Middleware\Google2fa::class,
...
],
] Configreturn [
/**
* Disable or enable middleware.
*/
'enabled' => env('GOOGLE_2FA_ENABLED', true),
'models' => [
/**
* Change this variable to path to user model.
*/
'user' => 'App\User',
/**
* Change this if you need a custom connector
*/
'user2fa' => User2fa::class,
],
'tables' => [
/**
* Table in which users are stored.
*/
'user' => 'users',
],
'recovery_codes' => [
/**
* Number of recovery codes that will be generated.
*/
'count' => 8,
/**
* Number of blocks in each recovery code.
*/
'blocks' => 3,
/**
* Number of characters in each block in recovery code.
*/
'chars_in_block' => 16,
/**
* The following algorithms are currently supported:
* - PASSWORD_DEFAULT
* - PASSWORD_BCRYPT
* - PASSWORD_ARGON2I // available from php 7.2
*/
'hashing_algorithm' => PASSWORD_BCRYPT,
],
]; SecurityIf you discover any security-related issues, please email the author instead of using the issue tracker. CreditsLicenseMIT license. Please see the license file for more information. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论