Download the PHP package renderbit/backpack-2fa without Composer
On this page you can find all versions of the php package renderbit/backpack-2fa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download renderbit/backpack-2fa
More information about renderbit/backpack-2fa
Files in renderbit/backpack-2fa
Package backpack-2fa
Short Description 2FA integration for Laravel Backpack using Fortify
License MIT
Homepage https://github.com/renderbit/backpack-2fa
Informations about the package backpack-2fa
Backpack 2FA
2FA integration for Laravel Backpack using Fortify
Provides Google 2-Factor Authentication for Backpack admin users, including QR codes, recovery codes, and a custom challenge view.
Package Overview
This package enables secure two-factor authentication for Laravel Backpack admin users. It integrates:
- Laravel Fortify for 2FA handling.
- PragmaRX Google2FA for QR code generation.
- Seamless Backpack admin middleware and guards.
- Recovery codes and 2FA setup flow.
Features
- Enable/disable 2FA for Backpack admin users
- Generate QR codes for Google Authenticator
- Regenerate/download recovery codes
- Customizable views for 2FA challenge
- Works with Backpack v6+ and Laravel 10+
- Full package-based implementation (no app-level Fortify modifications required)
- Optional middleware
twofactorto protect routes
Installation
-
Require the package via Composer:
-
Publish configuration and views (optional):
-
Verify your backpack guard is set in
config/auth.php: -
Add the
TwoFactorAuthenticatabletrait fromLaravel\Fortify\TwoFactorAuthenticatableto your authenticable model. - Clear config cache:
Routes
| Route | HTTP Method | Description |
|---|---|---|
/admin/two-factor |
GET | 2FA dashboard: view status, enable/disable 2FA |
/admin/setup-two-factor |
GET | Setup 2FA QR code for the user |
/admin/two-factor/enable |
POST | Enable 2FA for the logged-in user |
/admin/two-factor/disable |
POST | Disable 2FA for the logged-in user |
/admin/two-factor/recovery-codes |
POST | Regenerate recovery codes |
/admin/two-factor/recovery-codes-download |
POST | Download recovery codes as a .txt file |
/admin/two-factor/cancel |
GET | Cancel the 2FA setup flow |
/admin/two-factor-challenge |
GET | Display Fortify 2FA login challenge form |
/admin/two-factor-challenge |
POST | Submit Fortify 2FA login challenge form |
All /admin routes use the backpack guard and Backpack admin middleware automatically.
Middleware
twofactor→ Ensures that users have verified 2FA before accessing protected routes.- Example usage:
Summary - Package Installation in New Projects
composer require renderbit/backpack-2fa- Publish configs & views
- Clear caches
- Done — routes, controllers, and middleware are ready out-of-the-box.
License
MIT License © 2025 Renderbit Technologies
All versions of backpack-2fa with dependencies
illuminate/support Version ^10.0 || ^11.0 || ^12.0
backpack/crud Version ^6.0
pragmarx/google2fa-qrcode Version ^2.0
laravel/fortify Version ^1.31