2017 © Pedro Peláez
 

library laravel-oauth-library

Simple Facebook/Google OAuth Library for Laravel framework

image

changyy/laravel-oauth-library

Simple Facebook/Google OAuth Library for Laravel framework

  • Saturday, May 20, 2017
  • by changyy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

laravel-oauth-library

An Simple Facebook/Google OAuth Client for Laravel Framework, (*1)

Laravel Usage

$ php composer.phar require changyy/laravel-oauth-library
$ php artisan make:controller OAuthConnect
$ vim app/Http/Controllers/OAuthConnect.php
namespace App\Http\Controllers;

use Illuminate\Http\Request;

class OAuthConnect extends \org\changyy\OAuth\Controller\Connect
{
    public function handleFacebookConnected($oauth_ret = []) {
        print_r($oauth_ret);
    }
    public function initFacebook() {
        if(!session_id())
            session_start();
        parent::initFacebook();
    }
    public function handleGoogleConnected($oauth_ret = []) {
        print_r($oauth_ret);
    }
}

$ vim routes/web.php
Route::get('/connect/facebook', 'OAuthConnect@connectFacebook');
Route::get('/connect/google', 'OAuthConnect@connectGoogle');

$ vim config/oauth.php
return [
    'methods' => [
        'facebook' => [
            'tag' => 'facebook',
            'default_graph_version' => 'v2.9',
            'app_id' => 'xxxxx',
            'secret_key' => 'xxxxxx',
            'scope' => [ 'email' ],
            'done_handler' => '/',
            'error_handler' => '/connect/error',
        ],  
        'google' => [
            'tag' => 'google',
            'client_id' => 'xxxxx',
            'client_secret' => 'xxxxx',
            'scope' => [ 'email', 'profile' ],
            'done_handler' => '/',
            'error_handler' => '/connect/error',
        ],
];

The Versions

20/05 2017

dev-master

9999999-dev https://github.com/changyy/laravel-oauth-library

Simple Facebook/Google OAuth Library for Laravel framework

  Sources   Download

MIT

The Requires

 

by Yuan-Yi Changy

oauth google sdk facebook

20/05 2017

1.0

1.0.0.0 https://github.com/changyy/laravel-oauth-library

Simple Facebook/Google OAuth Library for Laravel framework

  Sources   Download

MIT

The Requires

 

by Yuan-Yi Changy

oauth google sdk facebook