Authenticate mobile applications with Laravel Sanctum
Constantin Druc ยท 01 Apr, 2021
In this video we are going to take a look over how we can use Laravel Sanctum to provide token based authentication for mobile applications.
Install laravel sanctum:
composer require laravel/sanctum
Publish configuration and migration files:
php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"
Run the migrations:
php artisan migrate
Add the HasApiTokens trait to the User class.
Setup routes: login, registration, logout, and user.
Create LoginControlle.r
Create RegistrationController.
Create LogoutController.
Point the routes to the correct controller actions.
-
1Blade scaffolding with Laravel Breeze05:21
-
2Cleaning up unused old records and files in Laravel applications06:22
-
3Get all files except specific paths in Laravel09:41
-
Authenticate mobile applications with Laravel Sanctum21:22
-
5Verify user emails in a Laravel REST API14:39
-
6The only reasonable, cost-effective way to test validation in Laravel applications06:53
-
7Setup live reload with Laravel mix and BrowserSync03:49
-
8Fetch and save Youtube video details in your Laravel application13:50
-
9Create more objects for more powerful and expressive code04:26
-
10Mock HTTP requests in Laravel05:38
-
11Create nested arrays using dot notation in Laravel06:39
-
12Use data providers to reduce test duplication08:56
-
13Add Github and Google authentication to your Laravel application16:32
-
14Calculate remaining days until birthday05:24
-
1Blade scaffolding with Laravel Breeze05:21
-
2Cleaning up unused old records and files in Laravel applications06:22
-
3Get all files except specific paths in Laravel09:41
-
Authenticate mobile applications with Laravel Sanctum21:22
-
5Verify user emails in a Laravel REST API14:39
-
6The only reasonable, cost-effective way to test validation in Laravel applications06:53
-
7Setup live reload with Laravel mix and BrowserSync03:49
-
8Fetch and save Youtube video details in your Laravel application13:50
-
9Create more objects for more powerful and expressive code04:26
-
10Mock HTTP requests in Laravel05:38
-
11Create nested arrays using dot notation in Laravel06:39
-
12Use data providers to reduce test duplication08:56
-
13Add Github and Google authentication to your Laravel application16:32
-
14Calculate remaining days until birthday05:24