scheb/2fa
scheb/2fa adds two-factor authentication to Symfony applications with TOTP authenticator apps, email codes, backup codes, and trusted-device support. It integrates cleanly with Symfony Security and provides extensible, well-tested building blocks for securing user logins.
Consider it when:
Look elsewhere when:
For executives: Two-factor authentication is a checkbox on nearly every enterprise security review we will face, and its absence is a recurring reason deals stall late. This library lets us add it in days rather than weeks, without inventing security-critical code in-house. Cost is negligible; the real cost is the integration and the enrollment UX, and the risk is concentrated in a single maintained dependency rather than spread across our own crypto.
For engineering: A tested, MIT-licensed implementation of the hard parts — TOTP verification with clock-skew handling, single-use backup codes, trusted-device tokens, and a pluggable authenticator interface for anything we add later. On Symfony it is close to drop-in; on Laravel we own the wiring and should estimate it as a small integration project, not a dependency install. We keep control of enforcement policy and the user-facing flow; the library owns the mechanics.
The honest caveats to state up front: this is not a Laravel-native package despite being PHP, passkeys and SMS require custom work, and the community is modest — so we are betting on a well-maintained niche library for a security primitive. That bet is reasonable given the test coverage and documentation, but it is a bet, and someone should own watching its release cadence.
How can I help you explore Laravel packages today?