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.
Architecture fit
magic_links table), a middleware, a controller, and a Magiclink facade. Nothing exotic — no queue dependency, no external service, no separate auth server.URL::temporarySignedRoute semantics plus a hashed token row, usage counters, and expiry).Integration feasibility
composer require, publish config + migration, migrate, define the middleware-protected route, implement the post-validation callback. A competent Laravel developer can spike this in under a day.Technical risk
MagiclinkMiddleware. Tightening security posture inside a minor release is defensible, but it foretells a v3 that removes the old path. Pin the version and read the upgrade notes before every bump.APP_KEY and APP_URL. Key rotation invalidates every outstanding link; misconfigured proxies or load balancers break signature validation in ways that look like "the package is broken."Key questions
Auth::login() in our callback, and does that interact correctly with our existing guard, remember-me, and 2FA policy?Stack fit
magic_links table.Migration path
composer update.Compatibility
APP_KEY rotation and APP_URL drift are deployment-level compatibility hazards; add a smoke test that generates a link and follows it in staging after every deploy.magiclink in the web group intentionally and confirm interaction with CSRF, session, and any global auth middleware.config:cache refresh — document this in the runbook.Sequencing
Maintenance
expires_at — the table grows monotonically with every link issued.Support
Scaling
Failure modes
num_max_uses > 1, or a GET confirmation interstitial, or a POST-to-consume step.APP_KEY rotation silently invalidating all outstanding links — coordinate rotation with a drain window.expires_at.Ramp-up
How can I help you explore Laravel packages today?