Rest API Laravel Sanctum & Single Page Applications part2 (Laravel Sanctum setup, Login, Logout)

Channel:
Subscribers:
3,500
Published on ● Video Link: https://www.youtube.com/watch?v=J3d3yPR49Ng



Category:
Vlog
Duration: 27:43
2,096 views
40


In this Laravel API Tutorial video, we are going to activate Laravel Sanctum in our Laravel 8 Project, and create the Login & Logout endpoints. Laravel Sanctum provides an easy to implement authentication system for single page applications and mobile applications. 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: https://www.youtube.com/watch?v=WI1pqmQKTxE
Next video: https://www.youtube.com/watch?v=RzmIKEseddo

Timeline:
2:21 - Install the Laravel Installer
2:50 - Create a new Laravel application
3:43 - Install Laravel Sanctum via Composer
4:04 - Publish the configuration and migration files of Laravel Sanctum
4:27 - Run the database migrations
4:50 - Create the Login and Logout Controllers
5:48 - Add the Login endpoint in the app/routes/api.php
7:53 - Start building the Logic for the Login endpoint
8:36 - Create a database seeder for the users
11:55 - Run the database seeder for the users
13:19 - Retrieve the user info based on the given data from the request body
15:03 - Create the password validation logic
18:40 - Create a simple validation logic for the email and password field
21:47 - Create an access token for the fully authenticated user
24:08 - Create the logic for the Logout endpoint
25:28 - Create a route group that has an auth:sanctum middleware
25:53 - Create the logout endpoint in the app/routes/api.php
27:12 - Exclude the API URLs from CRSF Token Checking

Git: https://github.com/jackoftraits/rest-api-laravel-sanctum-spa-backend

Sound: www.bensound.com

#restapi #spa #laravelsanctum




Other Videos By Sentgine


2024-02-14React Datatable with Pagination, UPDATE Modal (CRUD) - Create Read Update Delete - Laravel REST API
2023-10-27React Datatable with Pagination, CREATE Modal (CRUD) - Create Read Update Delete - Laravel REST API
2023-02-18React Datatable with Pagination, DELETE Modal (CRUD) - Create Read Update Delete - Laravel REST API
2023-02-08React Datatable with Pagination, Modal (CRUD) - Create Read Update Delete - Laravel REST API Part3
2023-01-30React Datatable with Pagination, Modal (CRUD) - Create Read Update Delete - Laravel REST API Part2
2023-01-23React Datatable with Pagination, Modal (CRUD) - Create Read Update Delete - Laravel REST API Part1
2023-01-16Rest API Laravel Sanctum & Single Page Applications part6 - Frontend Login Component React - Part3
2023-01-09Rest API Laravel Sanctum & Single Page Applications part5 - Frontend Login Component React - Part2
2023-01-02Rest API Laravel Sanctum & Single Page Applications part4 - Frontend Login Component React
2022-06-21Rest API Laravel Sanctum & Single Page Applications part3 - Create Read Update Delete (CRUD)
2021-09-05Rest API Laravel Sanctum & Single Page Applications part2 (Laravel Sanctum setup, Login, Logout)
2021-08-29Rest API Laravel Sanctum & Single Page Applications part1
2021-03-15Laravel 8 Livewire Tutorial (Building a Simple CMS): Create a Simple Livewire Chat (part 14)
2021-02-11Laravel 8 Livewire Tutorial (Building a Simple CMS): Push Notifications without Pusher (part 13)
2021-02-01Laravel 8 Livewire Tutorial (Building a Simple CMS): Finalize Dynamic User Access Roles (part 12)
2021-01-19Laravel 8 Livewire Tutorial (Building a Simple CMS): Create a Livewire CRUD Generator (part 11)
2021-01-06Laravel 8 Livewire Tutorial (Building a Simple CMS) : User Access Roles Laravel Middleware (part10)
2020-12-25Laravel 8 Livewire Tutorial (Building a Simple CMS) : Implement Dynamic Navigation Menu (part9)
2020-12-10Laravel 8 Livewire Tutorial (Building a Simple CMS) : Understanding the Basics of Alpine JS (part8)
2020-11-30Laravel 8 Livewire Tutorial (Building a Simple CMS) : Frontend Design Using Tailwind CSS (part7)
2020-11-18Laravel 8 Livewire Tutorial (Building a Simple CMS) : A Brief Intro To Tailwind CSS (part6)



Tags:
laravel sanctum
rest api
rest
api
restful api
single page applications
laravel
laravel seeder
laravel installation
laravel 8
laravel 8 sanctum
laravel sanctum tutorial
laravel api tutorial
rest api tutorial