Password-less Login with Laravel 8+
Create a pass-phrase or 'magic-link' login system for Laravel 8 and Jetstream
✅ Checked works with Laravel 10
Introduction
Prepare
Remove the requirement for passwords
Remove password fields from login and register forms
<div>
<x-jet-label value="Email" />
<x-jet-input class="block w-full mt-1" type="email" name="email" :value="old('email')" required autofocus />
</div>
{{--
<div class="mt-4">
<x-jet-label value="Password" />
<x-jet-input class="block w-full mt-1" type="password" name="password" required autocomplete="current-password" />
</div>
--}}
<input type="hidden" value="password" name="password" />
Create user with default password

Create a source of pass-phrases
Put pass-phrase into session when user logs in
Create a listener
Bind our Listener to Events
Send the pass-phrase to our user
Create the notification
Call the Notification and provide the pass-phrase
Testing
Accept and validate the pass-phrase
Create Controller
Create a form for the capture of the pass-phrase
Testing
Add middleware to block access until pass-phrase accepted
Make Middleware
Include the Middleware as a global route middleware
Testing
Cleaning up
Remove references to passwords
Conclusion
Feedback
Last updated