2017 © Pedro Peláez
 

library laravel-social-passport

Adds additional grant types to Laravel's Passport library

image

bigpaulie/laravel-social-passport

Adds additional grant types to Laravel's Passport library

  • Thursday, January 11, 2018
  • by bigpaulie
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel social passport

Build Status Latest Stable Version Total Downloads Latest Unstable Version License composer.lock, (*1)

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)

Installation

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

Supported networks

  • Facebook

Basic usage

By using the package I assume that you've already installed and configured laravel/passport package., (*6)

Facebook

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)

Dependencies

In order for this project to function properly some extra packages are needed., (*13)

Road map

The following features will be added in the future., (*14)

  • Twitter authentication
  • Github authentication
  • Google authentication
  • Events

Contributions

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)

The Versions

11/01 2018

dev-master

9999999-dev

Adds additional grant types to Laravel's Passport library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Paul P.

laravel oauth login facebook twitter passport stateless grant