Package Data | |
---|---|
Maintainer Username: | se1exin |
Maintainer Contact: | jacob@mirk.co (Jacob Morris) |
Package Create Date: | 2017-03-19 |
Package Last Update: | 2017-08-12 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-04-25 15:05:30 |
Package Statistics | |
---|---|
Total Downloads: | 496 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 7 |
Total Watchers: | 4 |
Total Forks: | 28 |
Total Open Issues: | 2 |
Please see @danjdewhurst's repo https://github.com/danjdewhurst/Laravel-Passport-Facebook-Login for a more up-to-date version.
Provides a new Laravel Passport Grant Client named facebook_login
, allowing you to log a user in with just their Facebook Login token
Note: A new User will be created if an existing user was not found for the given token
Install with composer... composer require mirkco/laravel-passport-facebook-login
Mirk\PassportFacebookLogin\FacebookLoginGrantProvider::class
to your list of providers after Laravel\Passport\PassportServiceProvider
.Mirk\PassportFacebookLogin\FacebookLoginTrait
Trait to your User
model (or whatever model you have configured to work with Passport)..env
file# file .env
FACEBOOK_APP_ID={app_id from Facebook}
FACEBOOK_APP_SECRET={app_secret from facebook}
https://your-site.com/oauth/token
, just like you would a Password or Refresh grant.grant_type
= facebook_login
and fb_token
= {token from facebook login}
.access_token
and refresh_token
will be returned if successful.It is assumed that your User
model has first_name
and last_name
fields.
This package is based off https://github.com/mikemclin/passport-custom-request-grant