← All plugins
MoonShine two-factor authentication
MoonShine Two-Factor Authentication - это пакет для MoonShine, который добавляет двухфакторную аутентификацию в админ-панель, позволяя повысить безопасность путем внедрения дополнительного уровня проверки при входе в систему.
MoonShine two-factor authentication
Requirements
Installation
composer require moonshine/two-factor
composer require moonshine/two-factor
composer require moonshine/two-factor
composer require moonshine/two-factor
composer require moonshine/two-factor
php artisan migrate
php artisan migrate
php artisan migrate
php artisan migrate
php artisan migrate
Get started
Add pipe to config/moonshine.php
use MoonShine\TwoFactor\TwoFactorAuthPipe;
return [
'auth' => [
'pipelines' => [
TwoFactorAuthPipe::class
],
]
];
use MoonShine\TwoFactor\TwoFactorAuthPipe;
return [
// ...
'auth' => [
// ...
'pipelines' => [
TwoFactorAuthPipe::class
],
// ...
]
// ...
];
use MoonShine\TwoFactor\TwoFactorAuthPipe;
return [
// ...
'auth' => [
// ...
'pipelines' => [
TwoFactorAuthPipe::class
],
// ...
]
// ...
];
use MoonShine\TwoFactor\TwoFactorAuthPipe;
return [
// ...
'auth' => [
// ...
'pipelines' => [
TwoFactorAuthPipe::class
],
// ...
]
// ...
];
use MoonShine\TwoFactor\TwoFactorAuthPipe;
return [
// ...
'auth' => [
// ...
'pipelines' => [
TwoFactorAuthPipe::class
],
// ...
]
// ...
];
Add trait TwoFactorAuthenticatable to model or use MoonShine\TwoFactor\Models\MoonshineUser
use MoonShine\TwoFactor\Traits\TwoFactorAuthenticatable;
class MoonshineUser extends Model
{
use TwoFactorAuthenticatable;
}
use MoonShine\TwoFactor\Traits\TwoFactorAuthenticatable;
class MoonshineUser extends Model
{
use TwoFactorAuthenticatable;
}
use MoonShine\TwoFactor\Traits\TwoFactorAuthenticatable;
class MoonshineUser extends Model
{
use TwoFactorAuthenticatable;
}
use MoonShine\TwoFactor\Traits\TwoFactorAuthenticatable;
class MoonshineUser extends Model
{
use TwoFactorAuthenticatable;
}
use MoonShine\TwoFactor\Traits\TwoFactorAuthenticatable;
class MoonshineUser extends Model
{
use TwoFactorAuthenticatable;
}
Add component to ProfilePage
use MoonShine\TwoFactor\ComponentSets\TwoFactor;
protected function components(): array
{
return [
TwoFactor::make(),
];
}
use MoonShine\TwoFactor\ComponentSets\TwoFactor;
protected function components(): array
{
return [
// ...
TwoFactor::make(),
];
}
use MoonShine\TwoFactor\ComponentSets\TwoFactor;
protected function components(): array
{
return [
// ...
TwoFactor::make(),
];
}
use MoonShine\TwoFactor\ComponentSets\TwoFactor;
protected function components(): array
{
return [
// ...
TwoFactor::make(),
];
}
use MoonShine\TwoFactor\ComponentSets\TwoFactor;
protected function components(): array
{
return [
// ...
TwoFactor::make(),
];
}