Rest API Laravel Sanctum & Single Page Applications part5 - Frontend Login Component React - Part2

Published: 09 January 2023
on channel: Sentgine
749
10

In this Laravel API Tutorial video, we are going to activate Laravel Sanctum in our Laravel 8 Project, and create the CRUD (Create, Read, Update, Delete) endpoints. Laravel Sanctum provides an easy to implement authentication system for single page applications and mobile applications. The CRUD (Create, Read, Update, Delete) endpoints are the fundamentals of an enterprise application, so it would be a great advantage for you if you learn the basics of it. This time, we are going to create the Login Component's functionality.

You can easily implement token based user authentication using Laravel Sanctum. You can follow this Laravel API Tutorial video as a starting project for your Rest API projects. This Laravel API Tutorial video will assist you in making your first Rest API.

Download composer: https://getcomposer.org/download/
Using Laravel 8.54

Previous video:    • Rest API Laravel Sanctum & Single Pag...  
Next Video: Coming soon

2:30 - Creating pages
7:31 - Adding Routes using the React Router
15:00 - Create the login functionality
20:07 - Capture the Email and the Password field value
22:40 - Start our Backend Code (Laravel API)
27:49 - Make an API Request using Axios
35:00 - Capture and display the errors on the Login form
42:00 - Optional Chaining
46:06 - Save the access token to the local storage
52:58 - Set error empty if email and password is correct
56:30 - Redirect the user after logged in

Git: https://github.com/jackoftraits/rest-...
Git frontend: https://github.com/sentgine/react-fro...

Relevant Links:
https://tailwindcss.com/docs/guides/c...
https://reactrouter.com/en/main/start...
https://vitejs.dev/guide/env-and-mode...

#restapi #spa #laravelsanctum #react


Watch video Rest API Laravel Sanctum & Single Page Applications part5 - Frontend Login Component React - Part2 online without registration, duration hours minute second in high quality. This video was added by user Sentgine 09 January 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 74 once and liked it 1 people.