Playing
01. Introduction and demo

Transcript

00:00
In this course, we're going to learn how to authenticate with the Laravel
00:03
API from view using the composition API. We're going to start things out in the first section by setting up a fresh Laravel project with Sanctum and Fortify. We're going to configure everything we need to get our client speaking to our
00:18
backend, and then we're going to implement the ability to authenticate with a really simple auth module, thanks to the flexibility of the composition API. Laravel Sanctum comes in two parts. The first one is the ability to issue tokens, which we're not going to be
00:33
touching, instead, we're going to work with Sanctum's single page application authentication functionality. So we can just send requests down to our backend, have a cookie set and be authenticated on the client side.
00:46
Now in the second half of the course, we're going to create our own starter kit with more features like the ability to register, and we're also going to be building out a full middleware implementation so we can attach middleware to routes like our dashboard that will redirect a user over to the login
01:00
page if they're not authenticated. Okay, let's get started in the next episode by setting everything up, and then we'll work through step-by-step on how to authenticate with Laravel with Vue using Laravel Sanctum.

Episode summary

Welcome to the course! In this first episode, we give you an overview of what we're going to cover. You'll get a sneak peek at how to set up authentication in a Laravel API, and connect that to a Vue app using the Composition API.

We'll kick things off by setting up a brand new Laravel project and install both Sanctum and Fortify to handle authentication. We'll configure everything that's needed for the Vue frontend to communicate with the Laravel backend securely, focusing on Sanctum's cookie-based single page application authentication (not the token system).

Once that's done, the second half of the course will take things further—we'll create our own starter kit with extra features like user registration and custom middleware. This will let us protect routes (like a dashboard) so that only logged-in users can access them. If a user isn't authenticated, we'll redirect them to the login page.

Ready to dive in? Next episode we get hands-on by setting up our projects and start working through authentication step by step!

Episode discussion

No comments, yet. Be the first!