A driver-based multi-factor authentication package for Laravel
worksome/laravel-mfa is a Laravel package for a driver-based multi-factor authentication package for laravel.
It currently has 9 GitHub stars and 110.392 downloads on Packagist (latest version v0.3.0).
Install it with composer require worksome/laravel-mfa.
Discover more Laravel packages by worksome
or browse all Laravel packages to compare alternatives.
Last updated
A driver-based multi-factor authentication package for Laravel
You can install the package via composer:
composer require worksome/laravel-mfa
You can publish and run the migrations with:
php artisan vendor:publish --tag="mfa-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="mfa-config"
This is the contents of the published config file:
return [
'user' => \App\Models\User::class,
'channels' => [
\Worksome\MultiFactorAuth\Enums\Channel::Email->value => [
'driver' => env('MFA_EMAIL_DRIVER', 'null'),
],
\Worksome\MultiFactorAuth\Enums\Channel::Sms->value => [
'driver' => env('MFA_SMS_DRIVER', 'null'),
],
\Worksome\MultiFactorAuth\Enums\Channel::Totp->value => [
'driver' => env('MFA_TOTP_DRIVER', 'null'),
],
],
// ...
];
For the full configuration, see the config/mfa.php file.
$twoFactorAuth = new \Worksome\MultiFactorAuth\MultiFactorAuth();
$response = $twoFactorAuth->sms->make(
new \Worksome\MultiFactorAuth\DataValues\Sms\E164PhoneNumber('+14155552671'),
);
dd($response);
about commandThis package adds information to the artisan about command. This information can be disabled by setting
the mfa.features.about_command configuration to false.
composer test
Please see GitHub Releases for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.