Simple package that allows to make classes for multiple login methods
stormcode/multi-login-methods is a Laravel package for simple package that allows to make classes for multiple login methods.
It currently has 0 GitHub stars and 450 downloads on Packagist (latest version 1.4.2).
Install it with composer require stormcode/multi-login-methods.
Discover more Laravel packages by stormcode
or browse all Laravel packages to compare alternatives.
Last updated
Install through Composer:
composer require stormcode/multi-login-methods
Add trait to your User model:
use StormCode\MultiLoginMethods\Traits\MultipleLoginMethods
Publish config, migration and view:
php artisan vendor:publish --provider=StormCode\MultiLoginMethods\MultiLoginMethodsServiceProvider
Migrate database:
php artisan migrate
Whole configuration can be done trough the config file config/multiLoginMethods.php:
<?php
return [
/**
* Allowed login methods
*/
'enabled_login_methods' => [
StormCode\MultiLoginMethods\LoginMethods\EmailLogin::class,
StormCode\MultiLoginMethods\LoginMethods\PasswordLogin::class,
//StormCode\MultiLoginMethods\LoginMethods\SMSLogin::class
],
/**
* Drivers used to send emails, phones or other
*/
'send_drivers' => [
StormCode\MultiLoginMethods\LoginMethods\EmailLogin::class => \StormCode\MultiLoginMethods\SendDrivers\EmailDriver::class,
//StormCode\MultiLoginMethods\LoginMethods\SMSLogin::class
],
/**
* User model settings
*/
'auth_model' => \App\Models\User::class,
'auth_model_table' => 'users',
/**
* Max and minimum number of numbers in code sent to email or phone
*/
'minCodeLength' => 6,
'maxCodeLength' => 6,
/**
* Allowed attempts count, after which login attempt will be blocked
*/
'max_attempts' => 3,
];