PHPackages                             erinrugas/laravel-2fa - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. erinrugas/laravel-2fa

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

erinrugas/laravel-2fa
=====================

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

v2.1.0(3y ago)218MITPHPPHP ^8.0

Since Jun 23Pushed 3y ago2 watchersCompare

[ Source](https://github.com/erinrugas/laravel-2fa)[ Packagist](https://packagist.org/packages/erinrugas/laravel-2fa)[ Docs](https://github.com/erinrugas/laravel-2fa)[ RSS](/packages/erinrugas-laravel-2fa/feed)WikiDiscussions v2.x Synced yesterday

READMEChangelog (6)Dependencies (3)Versions (13)Used By (0)

Laravel 2FA
===========

[](#laravel-2fa)

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

Requirements
------------

[](#requirements)

- [Laravel 9](https://github.com/laravel/framework)
- [PHP 8](https://www.php.net/)

Installation
------------

[](#installation)

#### Create new laravel 9 app or follow instruction in [laravel docs](https://laravel.com/docs/9.x/installation)

[](#create-new-laravel-9-app-or-follow-instruction-in-laravel-docs)

```
laravel new your-app-name
```

#### Get the package using composer

[](#get-the-package-using-composer)

```
composer require erinrugas/laravel-2fa
```

#### For Laravel 8

[](#for-laravel-8)

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

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

[](#install-the-frontend-packages-this-will-add-bootstrap-5-and-sass-packagejson)

##### *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](https://laravel.com/docs/9.x/vite)*.

[](#note-if-you-are-using-laravel-9190-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.

[](#add-migration-file-for-two-factor-authentication-and-migrate-it)

```
php artisan laravel-2fa:migration
```

#### Run migrate.

[](#run-migrate)

```
php artisan migrate
```

#### Add this to your config/app.php

[](#add-this-to-your-configappphp)

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

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

[](#note-you-need-to-re-run-php-artisan-laravel-2fainstall-every-time-you-update-the-version)

License
-------

[](#license)

This Laravel 2FA is open source software license under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~37 days

Recently: every ~0 days

Total

12

Last Release

1378d ago

Major Versions

v1.1.3 → v2.0.02022-08-03

v1.1.4 → v2.1.02022-08-03

PHP version history (2 changes)v1.0.0PHP ^7.3|^8.0

v2.0.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23635559?v=4)[Erin Rugas](/maintainers/erinrugas)[@erinrugas](https://github.com/erinrugas)

---

Top Contributors

[![erinrugas](https://avatars.githubusercontent.com/u/23635559?v=4)](https://github.com/erinrugas "erinrugas (78 commits)")

---

Tags

Two Factor Authenticationbootstrap-5laravel 2faerinrugas

### Embed Badge

![Health badge](/badges/erinrugas-laravel-2fa/health.svg)

```
[![Health](https://phpackages.com/badges/erinrugas-laravel-2fa/health.svg)](https://phpackages.com/packages/erinrugas-laravel-2fa)
```

###  Alternatives

[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[pragmarx/google2fa-qrcode

QR Code package for Google2FA

12024.6M37](/packages/pragmarx-google2fa-qrcode)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

81158.7k4](/packages/stephenjude-filament-two-factor-authentication)[paragonie/multi-factor

Vendor-agnostic two-factor authentication library

142195.5k2](/packages/paragonie-multi-factor)[awes-io/auth

Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).

3826.7k1](/packages/awes-io-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
