PHPackages                             pownall/laravel-magic-login - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. pownall/laravel-magic-login

ActiveLibrary

pownall/laravel-magic-login
===========================

Passwordless login for Laravel. Allows users to login via a magic link.

0.2(5y ago)23MITPHPPHP ^7.4|^8.0

Since Sep 6Pushed 5y ago1 watchersCompare

[ Source](https://github.com/leepownall/laravel-magic-login)[ Packagist](https://packagist.org/packages/pownall/laravel-magic-login)[ Docs](https://github.com/leepownall/magic-login)[ RSS](/packages/pownall-laravel-magic-login/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (7)Versions (5)Used By (0)

Laravel Magic Laravel
=====================

[](#laravel-magic-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/55b0fca97ce4c981fc3f3a62498b2269ef0e8a3268087c24d78f706cd9494f07/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706f776e616c6c2f6c61726176656c2d6d616769632d6c6f67696e2e737667)](https://packagist.org/packages/pownall/laravel-magic-login)[![GitHub Workflow Status](https://camo.githubusercontent.com/5b7f304db248cd3a167673046d810c3ad94942b16a6d46953a5f3a1b184a5e86/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6c6565706f776e616c6c2f6c61726176656c2d6d616769632d6c6f67696e2f54657374733f6c6162656c3d7465737473)](https://camo.githubusercontent.com/5b7f304db248cd3a167673046d810c3ad94942b16a6d46953a5f3a1b184a5e86/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6c6565706f776e616c6c2f6c61726176656c2d6d616769632d6c6f67696e2f54657374733f6c6162656c3d7465737473)[![Total Downloads](https://camo.githubusercontent.com/aeb870cbada440a5da9ab1d9fba09296a07734272f8e0c86ddb71cd219b57a11/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706f776e616c6c2f6c61726176656c2d6d616769632d6c6f67696e2e737667)](https://packagist.org/packages/pownall/laravel-magic-login)

Allows you to create a temporary signed route that logs a user in. There is no config file, you define everything when generating the url.

I see the general usage being

`User requests login` -&gt; `You generate link and send in email` -&gt; `User clicks link and is signed in`.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require pownall/magic-login
```

Available Methods
-----------------

[](#available-methods)

- `redirectToUrl(string $url)` - Default is `/`.
- `expiresAt(CarbonInterface $pointInTime)` - Default is `1 hour` after generating link.

Usage
-----

[](#usage)

Simple usage is:

```
MagicLogin::forUser($user)->generate();
```

---

If you want to alter the redirect url:

```
MagicLogin::forUser($user)
    ->redirectToUrl('/somewhere-else')
    ->generate();
```

or

```
MagicLogin::forUser($user)
    ->redirectToUrl(route('admin.dashboard'))
    ->generate();
```

---

If you want to make the link expire earlier or later pass a `CarbonInterface` to the `expireAt` method.

```
MagicLogin::forUser($user)
    ->expireAt(Carbon::now()->addMinutes(30))
    ->generate();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Lee Pownall](https://github.com/leepownall)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~29 days

Total

4

Last Release

1987d ago

PHP version history (2 changes)0.1.0-alphaPHP ^7.4

0.2PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c88d0e06a53e4dc4c679dbb1598c76c4d17e23b37011e5865bc583c295db96db?d=identicon)[Pownall](/maintainers/Pownall)

---

Top Contributors

[![leepownall](https://avatars.githubusercontent.com/u/757140?v=4)](https://github.com/leepownall "leepownall (35 commits)")

---

Tags

laravelmagic-loginpasswordless-loginPasswordlessmagic-loginpasswordless-laravelmagic-login-laravel

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pownall-laravel-magic-login/health.svg)

```
[![Health](https://phpackages.com/badges/pownall-laravel-magic-login/health.svg)](https://phpackages.com/packages/pownall-laravel-magic-login)
```

###  Alternatives

[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[acidjazz/humble

passwordless authentication and detailed sessioning for laravel

15136.5k](/packages/acidjazz-humble)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
