Laravel authenticate an API without using Laravel Passport. We learn without using Laravel Passport. So thing is that in some cases you don't need the complexity of Laravel Passport needs.

In this tutorial, we will learn How to create Laravel authenticate an API without using Laravel Passport. We learn without using Laravel Passport. So thing is that in some cases you don’t need the complexity of Laravel Passport needs. Since Laravel 5.3, Laravel Passport provides to authenticate an API consumer with an access token.

Here, for example, we build a website that provides to users a few API routes and that the user can call to update his data. Not need a full OAuth system and do not need multiple database tables to store tokens that could expire.

Simply, I just give you a unique token to users register or log in, and they use it in their API calls in authenticated.

  1. Add token field in users table
  2. Generate Token
  3. Use Token
  4. Check config file
  5. Check Middleware
  6. Authenticate the user with the token

#laravel 

API Authentication in Laravel without using Laravel Passport
1 Likes45.50 GEEK