PHPackages                             solution-forest/filament-email-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. solution-forest/filament-email-2fa

ActiveLibrary

solution-forest/filament-email-2fa
==================================

filament-email-2fa

2.2.2(2mo ago)328.6k↓34.1%9MITPHPPHP ^8.1CI passing

Since Apr 9Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/solutionforest/filament-email-2fa)[ Packagist](https://packagist.org/packages/solution-forest/filament-email-2fa)[ Docs](https://github.com/solution-forest/filament-email-2fa)[ GitHub Sponsors](https://github.com/solution-forest)[ RSS](/packages/solution-forest-filament-email-2fa/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (26)Versions (13)Used By (0)

filament-email-2fa
==================

[](#filament-email-2fa)

[![Latest Version on Packagist](https://camo.githubusercontent.com/33a2bc9a7695acfbf9452711a8b61955de2a96a0dfc288ba390101e5bc31f372/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f6c7574696f6e2d666f726573742f66696c616d656e742d656d61696c2d3266612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/solution-forest/filament-email-2fa)[![GitHub Tests Action Status](https://camo.githubusercontent.com/b6daca4e28609193df6a374acb783da04ae76e95902bea59ae61654019394c7d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736f6c7574696f6e2d666f726573742f66696c616d656e742d656d61696c2d3266612f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/solution-forest/filament-email-2fa/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/cf5e1a0ababd1c7a37b070ca3d513ea86781e33055bc17679888722cbc7edf63/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736f6c7574696f6e2d666f726573742f66696c616d656e742d656d61696c2d3266612f6669782d7068702d636f64652d7374796c696e672e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/solution-forest/filament-email-2fa/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/3e4fa964d616a1d7ba1a439c682945fcaf803266a8be4bd60953e84522ab7cea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f6c7574696f6e2d666f726573742f66696c616d656e742d656d61696c2d3266612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/solution-forest/filament-email-2fa)

Secure Your Filament Applications with Email-Based 2FA
------------------------------------------------------

[](#secure-your-filament-applications-with-email-based-2fa)

This package seamlessly integrates two-factor authentication (2FA) into your Filament PHP applications using email verification codes. Enhance the security of your user accounts and protect sensitive data.

[![image](https://private-user-images.githubusercontent.com/68211972/339963746-8fcefe16-c280-41f0-bc26-652f285b8975.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUzNTg1NzQsIm5iZiI6MTc3NTM1ODI3NCwicGF0aCI6Ii82ODIxMTk3Mi8zMzk5NjM3NDYtOGZjZWZlMTYtYzI4MC00MWYwLWJjMjYtNjUyZjI4NWI4OTc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA1VDAzMDQzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQxYjYzNjY1M2NmN2RmYzU3YTc4ZTE3YTY1ZjhkZjQ1ZWZiMTM1MTdjZTZiNWEzNTI0ZGE4MTU0YjIzNGNiODAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.UaYyGxEnFWO3a6ATWCIwtgbtisLS6CFM9pkTSsF7LZI)](https://private-user-images.githubusercontent.com/68211972/339963746-8fcefe16-c280-41f0-bc26-652f285b8975.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUzNTg1NzQsIm5iZiI6MTc3NTM1ODI3NCwicGF0aCI6Ii82ODIxMTk3Mi8zMzk5NjM3NDYtOGZjZWZlMTYtYzI4MC00MWYwLWJjMjYtNjUyZjI4NWI4OTc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA1VDAzMDQzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQxYjYzNjY1M2NmN2RmYzU3YTc4ZTE3YTY1ZjhkZjQ1ZWZiMTM1MTdjZTZiNWEzNTI0ZGE4MTU0YjIzNGNiODAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.UaYyGxEnFWO3a6ATWCIwtgbtisLS6CFM9pkTSsF7LZI)

### Key Features:

[](#key-features)

- Easy Integration: Quickly add 2FA to your Filament projects with minimal configuration.
- Email Verification: Users receive time-sensitive codes via email for secure login.
- Customizable: Tailor the 2FA experience with configurable options (e.g., code expiry time).
- Seamless User Experience: Provides a user-friendly interface for setting up and using 2FA.

### How it Works:

[](#how-it-works)

- Upon successful login, users are prompted to enter a verification code sent to their email address.
- The package handles code generation, email delivery, and verification logic.
- Once verified, users gain access to the protected Filament panel.

### Ideal For:

[](#ideal-for)

Filament applications handling sensitive user data. Projects requiring an extra layer of account security. Developers seeking a straightforward 2FA solution.

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

[](#installation)

You can install the package via composer:

```
composer require solution-forest/filament-email-2fa
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="filament-email-2fa-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="filament-email-2fa-config"
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-email-2fa-views"
```

This is the contents of the published config file:

```
return [
    'code_table' => 'filament_email_2fa_codes',
    'verify_table' => 'filament_email_2fa_verify',

    'code_model' => \Solutionforest\FilamentEmail2fa\Models\TwoFaCode::class,
    'verify_model' => \Solutionforest\FilamentEmail2fa\Models\TwoFaVerify::class,

    'expiry_time_by_mins' => 10,

    '2fa_page' => \Solutionforest\FilamentEmail2fa\Pages\TwoFactorAuth::class,
    'login_success_page' => \Solutionforest\FilamentEmail2fa\Pages\LoginSuccessPage::class,
];
```

Adding the plugin to a panel
----------------------------

[](#adding-the-plugin-to-a-panel)

```
use Solutionforest\FilamentEmail2fa\FilamentEmail2faPlugin;

return $panel
        // ...
        ->plugin(FilamentEmail2faPlugin::make());
```

Preparing your filament user class
----------------------------------

[](#preparing-your-filament-user-class)

Implement the 'RequireTwoFALogin' interface and use the 'HasTwoFALogin' trait

```
use Solutionforest\FilamentEmail2fa\Interfaces\RequireTwoFALogin;
use Solutionforest\FilamentEmail2fa\Trait\HasTwoFALogin;

class FilamentUser extends Authenticatable implements FilamentUserContract,RequireTwoFALogin{
    use HasTwoFALogin;
}
```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance86

Actively maintained with recent releases

Popularity37

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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 ~64 days

Recently: every ~30 days

Total

12

Last Release

67d ago

Major Versions

1.1.3 → 2.1.02025-07-11

1.x-dev → 2.0.02025-11-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/9499120912b47a170291b3b795ea0255f060d8500bd2988535e4e6faccee5c8d?d=identicon)[solutionforest](/maintainers/solutionforest)

---

Top Contributors

[![angielam](https://avatars.githubusercontent.com/u/69133078?v=4)](https://github.com/angielam "angielam (18 commits)")[![lam0819](https://avatars.githubusercontent.com/u/68211972?v=4)](https://github.com/lam0819 "lam0819 (2 commits)")[![RanaTuhin](https://avatars.githubusercontent.com/u/41468836?v=4)](https://github.com/RanaTuhin "RanaTuhin (1 commits)")

---

Tags

2fa2fa-security2factorcmsfilament-pluginfilamentphpfilamentphp-pluginlaravellaravelSolution Forestfilament-email-2fa

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/solution-forest-filament-email-2fa/health.svg)

```
[![Health](https://phpackages.com/badges/solution-forest-filament-email-2fa/health.svg)](https://phpackages.com/packages/solution-forest-filament-email-2fa)
```

###  Alternatives

[joaopaulolndev/filament-edit-profile

Filament package to edit profile

250258.1k34](/packages/joaopaulolndev-filament-edit-profile)[guava/filament-knowledge-base

A filament plugin that adds a knowledge base and help to your filament panel(s).

206120.5k1](/packages/guava-filament-knowledge-base)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

9169.0k4](/packages/marcelweidum-filament-expiration-notice)[guava/filament-modal-relation-managers

Allows you to embed relation managers inside filament modals.

7565.0k4](/packages/guava-filament-modal-relation-managers)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[solution-forest/filament-firewall

This is a middleware for whitelisting/blacklisting for Filament Admin

457.8k3](/packages/solution-forest-filament-firewall)

PHPackages © 2026

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