dev-master
9999999-devAdds additional grant types to Laravel's Passport library
MIT
The Requires
The Development Requires
by Paul P.
laravel oauth login facebook twitter passport stateless grant
Adds additional grant types to Laravel's Passport library
This project is ideal for applications where the front-end is decoupled from the back-end such as vue.js, angular, cordova, etc. Providing stateless social authentication via Laravel's Passport library., (*2)
Install social passport via composer, (*3)
composer require bigpaulie/laravel-social-passport
Publish package resources., (*4)
php artisan vendor:publish
Run the migrations, (*5)
php artisan migrate
By using the package I assume that you've already installed and configured laravel/passport package., (*6)
At this moment I assume that your user table has a first_name and a last_name column, the migration file will automatically add a facebook_id column., (*7)
Add the FacebookPassportProvider to you config/app.php providers array, (*8)
\Bigpaulie\Laravel\Social\Passport\FacebookPassportProvider::class,
Add the SocialPassport contract to your user model., (*9)
use SocialPassport;
From this moment onward you are ready to use Facebook's access token to authenticate your users., (*10)
Send a POST request to oauth/token with the following body, (*11)
{ "grant_type": "facebook_login", "client_id": "<passport_client_id>", "client_secret": "<passport_client_secret>", "facebook_token": "<facebook_access_token>" }
Pay attention to the "grant_type" key, (*12)
In order for this project to function properly some extra packages are needed., (*13)
The following features will be added in the future., (*14)
Contributions are most welcomed as long as you follow the existing code style and testing pattern., (*15)
Please feel free to fork, code and submit a pull request, (*16)
Adds additional grant types to Laravel's Passport library
MIT
laravel oauth login facebook twitter passport stateless grant