lahthony/otp-auth-bundle
A Laravel package for adding OTP-based authentication to your application. It provides one-time password generation, verification, and delivery hooks, making it easier to implement passwordless login or two-factor authentication flows with minimal configuration.
recoveryAction for account recovery. Buying it removes a security-sensitive, low-differentiation build from your roadmap — the kind of code that is cheap to write once and expensive to maintain correctly.recoveryAction now throws an exception when the user has no OTP authentication configured, instead of proceeding. That is a product decision the package has made for you: recovery is only valid for users who are actually enrolled. Your roadmap must account for the pre-enrollment / migrated-user segment separately (support-assisted recovery, re-enrollment prompt, or a different flow).Consider it when:
Before adopting, verify:
recoveryAction must catch the new exception and map it to a user-facing 4xx (not a 500). Audit existing call sites; grep for recoveryAction and add a regression test for the "user without OTP" case. Pin to ^1.2.4 so you don't ship the pre-hotfix silent-failure behavior.\Exception; catching broadly is a code smell that will bite you later.Look elsewhere when:
For executives: This is a small, low-cost dependency that covers two-factor authentication and account recovery — a security-sensitive area we would otherwise staff and maintain ourselves. Release 1.2.4 is a one-line hardening patch: recovery attempts for users who never set up OTP now fail loudly instead of proceeding silently. That is a net reduction in risk (silent failures in auth flows are exactly the bugs that become incidents and support escalations), there is no migration work, and no customer-visible change for correctly enrolled users.
For engineering: Behavior change is confined to recoveryAction, which now throws when the target user has no OTP authentication configured. Action items: (1) wrap all recoveryAction call sites in a try/catch and return a clear 4xx with re-enrollment guidance; (2) add a test covering the no-OTP user; (3) pin ^1.2.4 and bump the lockfile. No API removal, no schema change, no deprecations — but treat the new exception as part of the public contract going forward and don't let it escape as an unhandled 500.
How can I help you explore Laravel packages today?