LaravelPackages.net
Acme Inc.
Toggle sidebar
erinrugas/laravel-2fa

Minimal starter laravel application with two factor authentication and using bootstrap 5.

18
2
v2.1.0
About erinrugas/laravel-2fa

erinrugas/laravel-2fa is a Laravel package for minimal starter laravel application with two factor authentication and using bootstrap 5.. It currently has 2 GitHub stars and 18 downloads on Packagist (latest version v2.1.0). Install it with composer require erinrugas/laravel-2fa. Discover more Laravel packages by erinrugas or browse all Laravel packages to compare alternatives.

Last updated

Laravel 2FA

Minimal starter laravel application with two factor authentication using bootstrap 5.

Requirements

Installation

Create new laravel 9 app or follow instruction in laravel docs

laravel new your-app-name

Get the package using composer

composer require erinrugas/laravel-2fa

For Laravel 8

composer require erinrugas/laravel-2fa "^1.1.4"

Install the frontend packages (this will add bootstrap 5 and sass package.json)

NOTE: If you are using laravel 9.19.0 or latest, this command will remove vite and revert back to laravel-mix. To migrate from laravel-mix to vite you may follow laravel instruction here.
php artisan laravel-2fa:install
npm install npm run dev

Add migration file for two factor authentication and migrate it.

php artisan laravel-2fa:migration

Run migrate.

php artisan migrate

Add this to your config/app.php

'providers' => [
...
ErinRugas\Laravel2fa\TwoFactorAuthServiceProvider::class
...
]

NOTE: You need to re-run php artisan laravel-2fa:install every time you update the version

License

This Laravel 2FA is open source software license under the MIT license.

Star History Chart