Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament 2Fa Laravel Package

backstage/filament-2fa

Adds two-factor authentication to Filament panels. Users enroll via QR code with authenticator apps, confirm with a one-time code, and sign in with TOTP plus recovery codes. Includes setup pages, middleware, and customizable flows for securing your admin panel.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit The package is a thin presentation adapter: Laravel Fortify supplies the headless 2FA backend (TOTP provider, two_factor_secret / two_factor_recovery_codes / two_factor_confirmed_at columns, enable/confirm/disable/recovery-code endpoints), and this package supplies the Filament-facing UI so panel users can enrol, scan a QR code, confirm, and manage recovery codes without pulling in Jetstream or Breeze views. That is a clean fit only when Fortify is already (or is intended to become) the authentication source of truth for the panel's user model. It is a poor fit where Filament panels are bound to bespoke guards or a separate Admin model that Fortify does not know about — Fortify's 2FA endpoints and its TwoFactorAuthenticationProvider are effectively single-provider, and reconciling a multi-guard panel with them is custom work, not configuration.

Integration feasibility Low code footprint: composer require, register the plugin on the PanelProvider, publish/apply Fortify's 2FA migration, enable two_factor_authentication in config/fortify.php, and ensure FortifyServiceProvider is registered. A competent Laravel developer should reach a working demo in 1–2 days. The real cost is not the install; it is validating the edge cases (confirmation, recovery, disable, session invalidation) and the helpdesk process around lost devices.

Technical risk — overall: medium-high

Risk Severity Notes
Filament major-version coupling High Filament's page/form/plugin APIs changed materially between v3 and v4. The June 2025 release date suggests active maintenance, but pin and verify the actual composer.json constraint before planning. A Filament upgrade can silently strand this package.
Feature overlap with native Filament MFA High (strategic) Filament ≥3.2 ships first-party multi-factor authentication (app-based + email) that respects the panel's own guard. For greenfield panels, "buy" may mean "use the framework," and this package's value collapses to older Filament versions or teams that specifically need Fortify as the 2FA system of record (e.g., shared 2FA state with an SPA or mobile client). Validate this first — it can kill the initiative cheaply.
Guard/provider mismatch High Fortify's routes are configured against one guard. Filament's authGuard must align, or users will enrol successfully and still be challenged incorrectly.
Bus factor / ecosystem signal Medium 69 stars, 0 dependents, single maintainer org. No downstream validation and no commercial support.
Security-critical surface High impact, low likelihood Recovery-code storage, secret exposure in the QR payload, and session invalidation on enable/disable are correctness-sensitive. A defect here is a security incident, not a UI bug.
Route/middleware divergence Medium Fortify's password-confirmation and rate-limiting middleware must be reachable from the Filament flow; otherwise enabling 2FA is under-protected.

Key questions

  1. Does the released version support our target Filament major (and the next one)? What is the maintainer's stated upgrade policy?
  2. Which guard and user provider does each of our panels use, and does Fortify's configuration cover it?
  3. Why not Filament's native MFA — is there a concrete requirement (shared 2FA state with non-Filament clients, existing Fortify investment, audit tooling) that justifies a third-party dependency?
  4. What is the actual surface area? The description ("Integrate Laravel Fortify easily") is broader than the package name ("2FA") — confirm whether it also touches login/registration, which changes the blast radius.
  5. Is there a test suite, and does it cover recovery-code consumption and disable flows?

Integration Approach

Stack fit Assumes a Laravel monolith on the TALL stack with Filament panels and an Eloquent User model on the web guard — the overwhelmingly common case. It is not a fit for token-only API backends, for panels authenticating against an external IdP, or for multi-tenant setups where each tenant has a distinct user provider unless Fortify is reconfigured accordingly.

Migration path

  • Greenfield panel: add Fortify + this package before launch. Cheapest and safest; 2FA enforcement can be on from day one.
  • Existing panel without Fortify: additive. Fortify adds routes and config but does not replace Filament's login page unless explicitly wired; expect some interaction testing around /user/two-factor-* routes versus Filament's /admin/login.
  • Existing Fortify/Jetstream app: best case — columns and config already exist; the package only replaces the UI. Confirm you are not shipping two enrolment UIs to the same users.
  • Existing panel on a custom guard: treat as a custom integration project, not an install.

Compatibility checklist (verify, don't assume) PHP and Laravel minor ranges in composer.json; Filament major; two_factor_* columns present and nullable; config/fortify.php features array; cache/session driver suitable for Fortify's rate limiter; QR generation dependency pulled transitively (avoid a GD/Imagick surprise in a slim container image).

Sequencing

  1. Decision spike (2–3 days): stand up native Filament MFA and this package side by side in a throwaway branch; score against requirements. This is the highest-leverage step — it either retires the initiative or de-risks everything after it.
  2. Compatibility proof (1–2 days): confirm Filament version support, run enrolment → confirm → recovery-code login → disable on a staging clone with production-like data.
  3. Hardening (3–5 days): tests for the 2FA state machine, session invalidation, rate limiting, and an admin-initiated reset path.
  4. Rollout: enforce 2FA for privileged roles first, with a grace window and a documented recovery route.
  5. Contingency: vendor the package (MIT permits it) behind a thin internal interface so a Filament upgrade or abandonment is a swap, not a rewrite.

Operational Impact

Maintenance Budget a recurring line item: one Filament major upgrade per year is the realistic trigger, and the package may lag it. Pin the version, watch the repo's release cadence, and pre-agree a fork-and-patch threshold (e.g., "no compatible release within 30 days of a Filament major"). Do not let this become an unowned transitive dependency in the auth path.

Support No commercial support, no SLA, thin documentation. Internal ownership must be explicit — name a team, not an individual. Operationally, 2FA generates user support load, not system load: lost phones, wiped authenticator apps, exhausted recovery codes. Define and staff a reset procedure (admin-driven reset with identity verification and audit logging) before enforcement, not after the first lockout.

Scaling Technically negligible: TOTP verification is a local HMAC computation; no external calls, no meaningful latency or infrastructure cost. The scaling concern is organisational — helpdesk volume scales with admin headcount at roughly a few percent per quarter, and spikes after any forced-enrolment announcement.

Failure modes

  • Columns missing → runtime exception on the enrolment page (caught only if staging mirrors production schema).
  • Fortify feature flag off → 404/500 on enrolment routes.
  • Guard mismatch → users enrol but are never challenged, creating a false sense of compliance coverage — the most dangerous failure because it is silent.
  • Clock drift / device time skew → valid codes rejected, indistinguishable from a bug to the user.
  • Enrolment without confirmation → user believes 2FA is on; it is not.
  • Filament upgrade without a matching package release → broken panel login for 2FA users, potentially locking admins out of the very panel used to fix it. Keep a break-glass path.
  • Recovery codes not surfaced or not stored by the user → permanent lockout.

Ramp-up Half a day for a Laravel-fluent engineer to be productive; one to two days to be genuinely safe in the auth path, because the failure modes above are learned from docs-that-don't-exist rather than from the code. Factor onboarding for the helpdesk into the plan as well — they are the ones who will field the recovery calls.

Verdict for planning purposes: conditional adopt. Worth a short spike as a compliance accelerator (satisfies "MFA on administrative access" requirements for SOC 2 / ISO 27001 / cyber-insurance questionnaires that would otherwise cost weeks to build), but only after confirming it is not redundant with Filament's native MFA and only with an explicit fork/exit plan recorded alongside the dependency.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource