yusureabc/xiaomisocialite

Xiaomi OAuth2 Provider for Laravel Socialite

1.0.1 2017-07-11 02:08 UTC

This package is not auto-updated.

Last update: 2020-05-21 22:14:25 UTC


README

1.安装

composer require yusureabc/xiaomisocialite

2.添加 Service Provider 文件 config/app.php

'providers' => [
    // Laravel\Socialite\SocialiteServiceProvider::class,
    SocialiteProviders\Manager\ServiceProvider::class,
],

3.添加 Facades Aliase 文件 config/app.php

'aliases' => [
    'Socialite' => Laravel\Socialite\Facades\Socialite::class,
],

4.添加事件处理器 文件 app/Providers/EventServiceProvider.php

protected $listen = [
    'SocialiteProviders\Manager\SocialiteWasCalled' => [
        'Yusureabc\XiaomiSocialite\XiaomiExtendSocialite@handle',
    ],
];

5.配置 文件 .env

// XiaoMi oauth
XIAOMI_KEY=2882303761517596140
XIAOMI_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXX
XIAOMI_REDIRECT_URI=http://xxx.xxx.com/auth/callback?driver=xiaomi