PHPackages                             laraviet/backpack2fa - 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. laraviet/backpack2fa

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

laraviet/backpack2fa
====================

Apply Google Authenticator to Laravel Backpack project

1.0.0(7y ago)6212[1 issues](https://github.com/laraviet/backpack2fa/issues)[1 PRs](https://github.com/laraviet/backpack2fa/pulls)MITPHP

Since Jan 6Pushed 4y ago2 watchersCompare

[ Source](https://github.com/laraviet/backpack2fa)[ Packagist](https://packagist.org/packages/laraviet/backpack2fa)[ Docs](https://github.com/laraviet/backpack2fa)[ RSS](/packages/laraviet-backpack2fa/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (8)Versions (2)Used By (0)

Backpack2FA
===========

[](#backpack2fa)

Apply Google Authenticator to Laravel Backpack project

Prerequisite
------------

[](#prerequisite)

Need to install Backpack to your Laravel project first following [this instruction](https://backpackforlaravel.com/docs/3.5/installation)

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

[](#installation)

Via Composer

```
$ composer require laraviet/backpack2fa
```

Setup
-----

[](#setup)

```
php artisan migrate
php artisan vendor:publish --provider=PragmaRX\\Google2FALaravel\\ServiceProvider

```

**Edit `config\auth.php`**

from

```
'guard' => 'web',

```

to

```
'guard' => 'backpack',

```

**Edit `config\google2fa.php`**

from

```
'view' => 'google2fa.index',

```

to

```
'view' => 'backpack2fa::index',

```

**Edit `app\User.php`**

add `'google2fa_secret'` to `$fillable` and `$hidden`

add 2 more methods:

```
public function setGoogle2faSecretAttribute($value)
{
     $this->attributes['google2fa_secret'] = encrypt($value);
}

```

```
public function getGoogle2faSecretAttribute($value)
{
    return decrypt($value);
}

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

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

Unknown

Total

1

Last Release

2686d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d056c42d02d88340fe9e9ab8d9a7830a61d85f274a8b054e605c646e269d07af?d=identicon)[laraviet](/maintainers/laraviet)

---

Top Contributors

[![laraviet](https://avatars.githubusercontent.com/u/10137094?v=4)](https://github.com/laraviet "laraviet (8 commits)")

---

Tags

laravelBackpack2FA

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laraviet-backpack2fa/health.svg)

```
[![Health](https://phpackages.com/badges/laraviet-backpack2fa/health.svg)](https://phpackages.com/packages/laraviet-backpack2fa)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[laragear/two-factor

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

339785.3k8](/packages/laragear-two-factor)[olssonm/l5-very-basic-auth

Laravel stateless HTTP basic auth without the need for a database

1662.5M1](/packages/olssonm-l5-very-basic-auth)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)[pschocke/laravel-telegram-login-widget

Easily integrate Telegrams login widget into your Laravel application to send Telegram messages

1610.4k](/packages/pschocke-laravel-telegram-login-widget)

PHPackages © 2026

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