andriajah Sat Sep 2021 2 years ago

Laravel Api Authentication Using Jwt Tokens

Laravel login and generate JWT Token with Laravel Sanctum using HttpOnly Cookies. We will Login using JWT( JSON Web Token ) which is the standard method for SPA Authentications. We will not use the traditional "Bearer method" but instead we will login using HttpOnly cookies which is a more secure authentication.

Source code: https://github.com/scalablescripts/auth-backend

This video can be combined with other videos:
React and Laravel JWT Authentication: https://www.youtube.com/playlist?list=PLlameCF3cMEuSQb-UCPDcUV_re5uXaOU9
VueJS and Laravel JWT Authentication: https://www.youtube.com/playlist?list=PLlameCF3cMEs7ErSWENv03zOKtH5NTG61
Angular and Laravel JWT Authentication: https://www.youtube.com/playlist?list=PLlameCF3cMEtVCB8awarHu1NjIyEX0Va9
NextJS and Laravel JWT Authentication: https://www.youtube.com/playlist?list=PLlameCF3cMEsbPs3bmm98UP3Ny8tqNs1f
NuxtJS and Laravel JWT Authentication: https://www.youtube.com/playlist?list=PLlameCF3cMEt0mlfWzGkk9_a5iV_xF-wr
Svelte and Laravel JWT Authentication: https://www.youtube.com/playlist?list=PLlameCF3cMEssaXOEym93ID7_e6ZDyiGO

Check more tutorials:
Laravel RESTful APIs Advanced: Docker, Redis, Stripe: https://scalablescripts.com/p/laravel-advanced
Get access to all my courses for 15$/month: https://scalablescripts.com/p/membership

00:00 Intro
00:35 Laravel Installation
02:09 Routes
05:20 Database
08:33 Register
13:27 Login
24:48 Authenticated User
32:25 Logout

#laravel #php
jwt jwt authentication httponly cookie jwt httponly cookie laravel api authentication laravel jwt