> ## Documentation Index
> Fetch the complete documentation index at: https://docs.larafast.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Magic Links

> Users in Larafast

Magic links are a way to authenticate users without requiring them to enter a password. Instead, users receive an email containing a link that, when clicked, authenticates them for a limited time.

Magic links are handled inside `app/Http/Controllers/Auth/MagicLinkController.php` file.

```php web.php theme={null}
Route::prefix('auth')->group(function () {
    ...

    // Magic Links
    Route::post('/magic-link', [MagicLinkController::class, 'sendMagicLink'])->name('magic.link');
    Route::get('/magic-link/{token}', [MagicLinkController::class, 'loginWithMagicLink'])->name('magic.link.login');
});
```

<Warning>
  In order for Magic Links to work, you have to have Email configured in your application. You can configure email in your `.env` file.
</Warning>
