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 2w 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 52% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

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

2733d 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

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.2M17](/packages/directorytree-ldaprecord-laravel)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M337](/packages/psalm-plugin-laravel)[laragear/two-factor

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

341942.8k15](/packages/laragear-two-factor)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

84192.9k8](/packages/stephenjude-filament-two-factor-authentication)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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