Add Passkeys to a Laravel App
Passkeys provide a simpler and more secure alternative to traditional passwords. Neat, but there's only one problem: the implementation instructions are incredibly complicated. Don't worry, I know the feeling. In this series, work along with me to bring passkeys to Laravel, and gain all the insight you'll need to add passkeys to your own applications!
Progress
Series Info
- Episodes
- 7
- Run Time
- 1h 25m
- Difficulty
- Advanced
- Last Updated
- Oct 14, 2024
- Version
- Webauthn Framework V4
Series Episodes
- Models and Migrations (1)
- Creating a Passkey (2)
Passkey Options
You'd be forgiven for thinking that creating a passkey is as simple as asking for one in JavaScript before firing it off to our server, but there's an important we need to execute beforehand: asking our server for WebAuthn options. Let's talk about why and how in this episode.Storing a Passkey
With our frontend successfully generating passkeys, we need to send the data to our server to validate and store ready for authentication. Let's walk through the process step by step until we have a fully functioning implementation!
- Authenticating a Passkey (3)
Give Me a Challenge
Let's turn our focus to authenticating using passkeys. The first thing we need to do is ask our server for a challenge that a potential passkey can answer. This will allow our server to ensure you are who you say you are. Let's go ahead and add a new API route for generating one.Meeting the Challenge
Our passkey has answered the challenge, but who's to judge if it's worthy? That's the job of our server, so let's work on our final endpoint that will validate the answer and log in our user. You're almost password free, amigo!The Final Hurdle
There are times where your user will need to enter their username manually whilst still authenticating with a passkey. For those times, we need to implement a fallback method in our login form. Let's tackle this final hurdle together with a little bit of Alpine magic.
- Supplementary (1)
