承接 changyy/laravel-oauth-library 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

changyy/laravel-oauth-library

Composer 安装命令:

composer require changyy/laravel-oauth-library

包简介

Simple Facebook/Google OAuth Library for Laravel framework

README 文档

README

An Simple Facebook/Google OAuth Client for Laravel Framework

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',
        ],
];

统计信息

  • 总下载量: 20
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固