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

Laravel Auth Laravel Package

joe-404/laravel-auth

Drop-in, config-driven authentication for Laravel 12 and 13: OTP and magic-link verification, login, token refresh, password reset, multi-session management, Google OAuth, API tokens, account status workflow, and referral codes via a uniform JSON API.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package is a Laravel service provider that ships routes, migrations, config, events, and a response-formatting contract — a conventional, well-shaped Laravel package. It explicitly targets Laravel 12/13 with PHP 8.2+, pulls Sanctum 4, Socialite 5, and Spatie Permission 6 transitively, and mounts a ~60-endpoint JSON API under /auth (configurable prefix). For a greenfield, API-first Laravel service with no existing auth, it is close to a "install and go" fit. For anything with an existing users table, Sanctum setup, or permission model, the fit degrades sharply: the package requires four traits on the User model (HasApiTokens, HasRoles, SoftDeletes, HasAccountStatus), owns its own migrations, and assumes its own route namespace.

Integration feasibility. Mechanically easy, organizationally hard. composer require + php artisan auth:install + trait additions is a sub-day spike. The real cost sits in three places: (a) the schema footprint — account status, sessions, device history, trusted devices, referrals, audit logs, 2FA methods, backup codes, API tokens all land in the database and are non-trivial to unwind; (b) the response envelope contract, which will dictate frontend error handling and is only reshapable via ResponseFormatterContract; (c) the transitive Sanctum/Socialite/Spatie installs, which will collide with any pre-existing configuration of those packages.

Technical risk. Material, and concentrated in one place: this package owns the entire authentication and session boundary. Ranked:

  1. Bus factor / abandonment. 2 stars, 0 dependents, single maintainer, self-declared beta. Auth is the highest-blast-radius code path in the system; adopting an unvalidated third-party implementation puts a P0 surface on a one-person support chain.
  2. Pre-1.0 semantics under a 2.x label. The README references v2.6 feature milestones while simultaneously carrying a "BETA / TESTING" banner. Version numbers and stability claims are contradictory — an unreliable signal for upgrade-cadence planning.
  3. Attack surface concentration. OTP, magic links, refresh-token rotation with family revocation, TOTP/SMS/email 2FA, Google OAuth, step-up auth, device fingerprint trust, and referral anti-abuse all in one unaudited dependency. No CI badge, no coverage number, no security policy is visible in the README. Referral fraud detection based on IP/fingerprint matching is heuristic and adversarially weak by construction.
  4. Framework-version coupling. Claiming Laravel 13 support means tracking a framework release that is itself recent; combined with beta status, upgrade breakage compounds.
  5. Lock-in through migrations. Reversing out means backfilling your own auth tables and reissuing every token — effectively a forced re-authentication event for all users.
  6. Opportunity score of 1.9. The market for this problem (Fortify, Breeze, Jetstream, Sanctum, Passport, jwt-auth) is saturated; the package's differentiation is breadth, not depth, which is exactly the profile that struggles to attract the maintainer community needed to de-risk it.

Key questions. Does a published test suite exist and what does it cover — particularly refresh-token reuse detection, OTP expiry/replay, and 2FA challenge binding? Are migrations additive-only, or do they alter a pre-existing users table? How are OTPs and refresh tokens stored, and is Redis a hard requirement or a recommendation? What is the maintainer's stated support/security-disclosure policy? Has anyone other than the author run this in production? What happens to active sessions if the package is removed?

Integration Approach

Stack fit. Strong for a greenfield Laravel 12 API/SPA/mobile-backend with Redis already provisioned and no legacy auth. Weak for a brownfield app with an established users table, existing Sanctum tokens in the wild, or Spatie roles already configured — in that case the package becomes an overlay you must reconcile, not a drop-in.

Migration path. Do not adopt as a production dependency on the first pass. Sequence it as three discrete gates:

  • Gate 1 — Spike (1 sprint). Install on a throwaway branch with a scratch database. Exercise the full registration → verify → complete → login → refresh → logout chain against the documented JSON envelope. Produce a written inventory of every table, column, route, and config key the package introduces.
  • Gate 2 — Security and fit review. Have a senior engineer review refresh-token rotation, OTP storage/expiry, magic-link token handling (referrer/log leakage), lockout thresholds, and rate-limit keying. In parallel, decide the fork-vs-depend question.
  • Gate 3 — Adoption decision. Three viable outcomes: (a) depend on the upstream package, pinned to an exact version, with a standing upgrade obligation; (b) fork under MIT into a vendored internal package you own — the recommended path if the feature set is genuinely valuable, since it converts abandonment risk into maintenance cost you control; (c) harvest the config schema, event taxonomy, and endpoint contract as a specification and implement internally.

Compatibility. Verify three things before committing: that the four required traits do not conflict with existing traits or model casts; that routes.prefix cleanly avoids collisions with your current API surface; and that the transitive Sanctum/Socialite/Spatie constraints resolve against your composer.lock. The optional Reverb integration should be treated as out of scope for v1 — it adds websocket infrastructure for a non-critical latency improvement on OTP delivery.

Sequencing. Auth is a platform dependency, not a feature. Land it before feature work that assumes identity (referrals, 2FA-gated endpoints, admin status workflows) rather than after, and treat the response envelope as a published contract to the frontend team on day one. If forking, do it before any application code depends on the upstream namespace — the namespace change is cheap early and expensive late.

Operational Impact

Maintenance. Effectively yours, regardless of what you choose. With one maintainer and zero dependents, there is no upstream community to absorb bug reports or review PRs. Budget for a named internal owner, a pinned version, and a quarterly review of upstream activity. If the repo goes quiet for two release cycles, the fork decision is forced — plan for it rather than discovering it during an incident.

Support. No SLA, no commercial backing, issue-tracker-only support. Authentication failures are P0 by definition (nobody can log in), so the support burden lands entirely on your on-call rotation with no escalation path. The practical mitigation is deep familiarity: at least two engineers must be able to read the config surface and trace a failing login end-to-end without upstream help.

Scaling. Redis is load-bearing — OTP storage, refresh-token families, and rate limiting all lean on it, so Redis availability becomes an auth availability dependency. Token refresh is a write on every rotation; refresh-token family tracking grows unbounded unless pruned. Session and permanent device-history tables accumulate per-login and per-device respectively and will need retention policy. The ResponseFormatterContract gives you a clean seam for shaping responses at scale; the referral anti-abuse heuristics do not scale well and should be treated as advisory, not enforcing.

Failure modes. The high-severity ones: OTP or magic-link email delivery failure silently locks new users out of registration with no fallback path; aggressive lockout or rate-limit thresholds deny service to legitimate users under shared-IP conditions (corporate NAT, mobile carriers); refresh-token reuse detection revoking an entire token family triggers mass forced logout when a client retries incorrectly; account-status middleware misconfiguration turns a single user's suspension into a broader auth outage; magic-link tokens exposed via URL in logs or referrer headers. Each needs an explicit runbook entry and, where possible, a kill switch in config before go-live.

Ramp-up. The learning curve is broad rather than deep — a large config surface (config/auth_system.php), a sizable event taxonomy, pluggable contracts for response formatting and SMS drivers, and a three-step registration flow that differs from Laravel's default. The README and docs/ are above average for a package this size, but they document intended behavior, not tested behavior, and there is no evidence of third-party validation. Allocate a real onboarding task for the second engineer, and write an internal integration note covering your specific configuration, trait setup, and the deviations you made — that document, not the upstream README, becomes the source of truth the moment you fork or pin.

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.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel