Integrate Passport to your Laravel API
Hello everyone, welcome back to justlaravel.com. I am back with another tutorial, here I will show you how to integrate Passport (a Laravel’s API authentication package) into your Laravel applications.
Here I will create 2 Laravel projects, one is an API and other is the API consumer app. It basically means I will create an API with Passport package integrated. A normal Laravel app where I call the API and show its data.
Let’s get started!
Laravel API
- Passport Install
- Passport Configure
- Generate data – Faker | DB Seeding
- Routing | Getting info from DB
- Protect the routes with Passport
- Registration and Generating OAuth client_id and client_secret
Consumer APP
- Create a new App
- Install GuzzleHttp
- Authenticate the API and get the data
- Display the data
- Run the app
For full tutorial visit https://justlaravel.com/integrate-passport-laravel-api/
Related Links:
Post: https://justlaravel.com/integrate-passport-laravel-api/
Working Demo: https://demos.justlaravel.com/integrate-passport-laravel-api/
GitHub: https://github.com/avinashn/Laravel-Passport---API
Medium: https://medium.com/justlaravel/integrate-passport-to-your-laravel-apis-c58d0dd22c1d
YouTube: https://www.youtube.com/playlist?list=PLJKqSeQP_mlLdzQh4hBauovewIByGLztz
This post is submitted by our members. Submit a new post.
Tags: Tutorials Laravel 5.8 Laravel 5.7 Laravel 5.6 Laravel 5.5 Laravel 5.4 Laravel 5.3 Laravel 5 Beginner