Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

lialosiu/socialite-china

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

lialosiu/socialite-china

Introduction

Laravel Socialite OAuth authentication for China.

Usage

composer require "lialosiu/socialite-china:~1.2"

Add provider Lialosiu\SocialiteChina\SocialiteChinaServiceProvider::class in your config/app.php

Add aliases 'SocializeChina' => Lialosiu\SocialiteChina\Facades\Socialite::class, in your config/app.php

Add config in config/services.php :

'weibo'    => [
    'client_id'     => env('WEIBO_APP_KEY', ''),
    'client_secret' => env('WEIBO_APP_SECRET', ''),
    'redirect'      => env('WEIBO_CALLBACK_URL', ''),
],

'qq'       => [
    'client_id'     => env('QQ_APP_KEY', ''),
    'client_secret' => env('QQ_APP_SECRET', ''),
    'redirect'      => env('QQ_CALLBACK_URL', ''),
],

'weixin'       => [
    'client_id'     => env('WEIXIN_APP_KEY', ''),
    'client_secret' => env('WEIXIN_APP_SECRET', ''),
    'redirect'      => env('WEIXIN_CALLBACK_URL', ''),
],

Add env in .env :

WEIBO_APP_KEY=YourWeiboAppKey
WEIBO_APP_SECRET=YourWeiboAppSecret
WEIBO_CALLBACK_URL=YourWeiboCallBackUrl

QQ_APP_KEY=YourQqAppKey
QQ_APP_SECRET=YourQqAppKey
QQ_CALLBACK_URL=YourQqCallBackUrl

WEIXIN_APP_KEY=YourWeixinAppKey
WEIXIN_APP_SECRET=YourWeixinAppKey
WEIXIN_CALLBACK_URL=YourWeixinCallBackUrl

Documentation

You can pass the token manually like

SocializeChina::with('weibo')->user('UserWeiboToken')

Other same with the laravel/socialite

Require

laravel/socialite

License

MIT license

About

Laravel Socialite OAuth authentication for China.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages