Download the PHP package whyounes/laravel-two-factor-auth without Composer
On this page you can find all versions of the php package whyounes/laravel-two-factor-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download whyounes/laravel-two-factor-auth
More information about whyounes/laravel-two-factor-auth
Files in whyounes/laravel-two-factor-auth
Package laravel-two-factor-auth
Short Description Laravel two factor authentication
License MIT
Homepage https://github.com/whyounes/laravel-two-factor-auth
Informations about the package laravel-two-factor-auth
Laravel Two Factor Authentication
Two Factor Authentication for Laravel 5.3+
Installation
Add the package to your project using Composer:
Publish package assets:
Run the migrations:
Add it to you providers list:
Add the TFAuthTrait
trait to your user model:
Configurations
There are only two configurations that you can set:
delete_verification_code_after_auth
: Set it totrue
if you want to delete unused verification codes after login.verification_code_length
: How long the verification code is.
Verification Code Sender
By default, the package uses Twilio to send verification codes (SMS and Phone). You can easily change it like this:
Next we should switch implementation in the container:
That's it, your new service is going to be used for sending verification codes. If you add a new service implementation, you can submit a new pull request and I'll add it to the package :)
Example
Check this repository for a demo application using the package.
All versions of laravel-two-factor-auth with dependencies
illuminate/database Version 5.1.* || 5.2.* || 5.3.*
illuminate/config Version 5.1.* || 5.2.* || 5.3.*
illuminate/events Version 5.1.* || 5.2.* || 5.3.*
illuminate/auth Version 5.1.* || 5.2.* || 5.3.*
twilio/sdk Version ^5.4