Magic links are a secure way to authenticate users without requiring a password. When a user requests a magic link, a unique URL is generated and sent to the user's email address. When the user clicks the link, they are automatically authenticated and redirected to your application.
To enable magic links:
.env
:
ALLOW_MAGIC_LINK_LOGIN=true
php artisan optimize
Users are now able to visit /login/magic-link
and request a magic link.
/resources/js/Components/NavBar.vue
href
to /login/magic-link
:
<a href="/login/magic-link" class="-mx-3 block rounded-lg px-3 py-2.5 text-skin-muted font-semibold leading-7 text-gray-900 hover:opacity-90">Log in</a>