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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. solution-forest/filament-email-2fa

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

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

filament-email-2fa

3.0.0(2w ago)3211.0k↑14%9MITPHPPHP ^8.2CI passing

Since Apr 9Pushed 2w 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 today

READMEChangelog (10)Dependencies (52)Versions (16)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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODIyMzQ0NDMsIm5iZiI6MTc4MjIzNDE0MywicGF0aCI6Ii82ODIxMTk3Mi8zMzk5NjM3NDYtOGZjZWZlMTYtYzI4MC00MWYwLWJjMjYtNjUyZjI4NWI4OTc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA2MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZY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2TXgnllcc)

### 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

56

—

FairBetter than 97% of packages

Maintenance97

Actively maintained with recent releases

Popularity38

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~57 days

Recently: every ~24 days

Total

15

Last Release

16d ago

Major Versions

1.1.3 → 2.1.02025-07-11

1.x-dev → 2.0.02025-11-11

2.x-dev → 3.0.02026-06-17

PHP version history (2 changes)1.0.10PHP ^8.1

3.0.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/68211796?v=4)[Solution Forest](/maintainers/solutionforest)[@solutionforest](https://github.com/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

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

84215.9k9](/packages/stephenjude-filament-two-factor-authentication)[jeffgreco13/filament-breezy

A custom package for Filament with login flow, profile and teams support.

1.0k2.1M56](/packages/jeffgreco13-filament-breezy)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6649.5k1](/packages/marcelweidum-filament-passkeys)[dutchcodingcompany/filament-socialite

Social login for Filament through Laravel Socialite

2191.1M10](/packages/dutchcodingcompany-filament-socialite)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)

PHPackages © 2026

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