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 Magiclink Laravel Package

cesargb/laravel-magiclink

Laravel package for passwordless authentication: generate signed, temporary magic links tied to a user, validate them, and enforce usage limits or expiration. Offers a simple API for creating and consuming links, with middleware support for login and verification flows.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Passwordless login / registration as a roadmap item. This package handles the plumbing behind email magic links — token generation, signing, expiry, single-use enforcement, and middleware-guarded routes. That turns "add passwordless auth" from a multi-sprint auth project into a scoped feature ticket, which is the difference between it landing this quarter or sitting in the backlog.
  • Build vs. buy for tokenized access. The core value isn't "login" — it's a reusable primitive for time-boxed, signed, revocable access links. That same primitive covers several roadmap items at once: invite-only onboarding, B2B seat provisioning, secure document/invoice sharing, download links for private assets, and email-verified account recovery. Build it once, reuse it across surfaces.
  • Friction reduction at the moments that matter. Login and password reset are high-abandonment steps, especially for low-frequency products (B2B admin tools, portals, annual billing). Magic links remove password creation from the funnel entirely, which is a measurable activation and support-cost lever rather than a nice-to-have.
  • Support-cost reduction. Every password reset ticket has a cost. Passwordless-first for low-frequency users shifts that load off support without requiring a helpdesk workflow change.
  • Prioritization signal for the auth roadmap. Adopting this deliberately lets you defer heavier investments (SSO/SAML, passkeys/WebAuthn, MFA) with a defensible rationale: magic link solves the 80% case for self-serve users, and SSO can be sold as an enterprise-tier feature later rather than a v1 requirement.
  • Experimentation. Because it's a small, isolated feature, you can ship magic link as an A/B test against password auth and let activation and reset-ticket data decide the default — instead of committing to a direction on intuition.
  • Explicit non-goals to write down now: this is an authentication mechanism, not an authorization system. Roles, permissions, tenant isolation, MFA policy, and audit-grade compliance logging are still yours to own. Scope that upfront so nobody assumes "auth is done."

When to Consider This Package

Good fit when:

  • You're on Laravel with a standard Eloquent user model and can register middleware — this is not framework-agnostic and shouldn't be forced into a non-Laravel service.
  • Email is your primary and verified channel, and you already have reliable transactional email delivery. Magic links are only as good as your deliverability.
  • The security bar is low-to-medium: self-serve SaaS, internal tools, customer portals, content gating. Not a substitute for regulated-environment controls.
  • You have a small team without a dedicated identity engineer and want days-to-weeks time-to-market rather than a bespoke auth service.
  • You want to own the data and avoid per-MAU auth vendor pricing — MIT license, self-hosted, no vendor lock-in beyond the library itself.
  • You're comfortable pinning a version and absorbing occasional upgrade work.

Look elsewhere when:

  • You need SSO/SAML/OIDC, SCIM provisioning, or enterprise buyer requirements. Those are different products; this doesn't replace them.
  • Compliance is load-bearing — HIPAA, PCI, FedRAMP, SOC 2 with strict evidence requirements. You'll want a vendor with a support contract, security documentation, and a disclosure process.
  • You need multi-channel delivery (SMS, WhatsApp, push) or step-up/adaptive auth. Email-only is the design center.
  • Maintenance risk is unacceptable. The signals here are worth flagging honestly to engineering: roughly 469 stars, a single primary maintainer, and zero dependents recorded on the package. That's a thin ecosystem. A recent release deprecating running magic links without the middleware also signals API churn — expect breaking-ish changes and pin your version.
  • You need link revocation dashboards, device/session management, or per-link analytics out of the box. You'll be building that layer yourself.
  • You'd be adopting it for one narrow use case and then wrapping it so heavily that you've effectively written your own token layer — at that point, compare the cost of ~1–2 weeks of in-house implementation using Laravel's native signed URLs and consider just owning it.

Adoption criteria I'd apply: timebox a spike, confirm it works with your existing auth guard and user model, verify the email flow end-to-end in staging with real deliverability, and require a thin internal wrapper interface so the dependency is swappable. If the spike exceeds the timebox, fall back to in-house.

How to Pitch It (Stakeholders)

For executives: We can ship passwordless login and secure private-content sharing in one or two sprints instead of building an auth subsystem, at zero license cost under MIT. The business case is activation and support cost: removing password creation from signup reduces a known drop-off point, and fewer reset tickets is a direct support-load reduction. It also lets us defer expensive identity work — SSO and passkeys become a paid enterprise feature later rather than a v1 blocker. The trade-off is deliberate: it's a small, single-maintainer open-source library, so we isolate it behind an internal interface, pin the version, and keep the exit cost to roughly a week. Low cost, reversible, and it unblocks multiple roadmap items with one primitive.

For engineering: It's a focused Laravel package, not an auth framework — it generates signed, expiring, single-use links and guards routes via middleware. The recent deprecation of middleware-less usage tells us the maintainer is tightening the security model, which is the right direction but means we pin a version and read changelogs before upgrading. Plan: wrap it behind an internal MagicLinkService contract, add integration tests around expiry and reuse, and keep the token layer swappable. We are still responsible for authorization, rate limiting, and email deliverability. Expect 1–2 sprints including tests, not 1–2 days.

Ask: Approve a timeboxed spike plus a go/no-go review at the end, with in-house implementation as the documented fallback.

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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource