我使用Laravel 5.4和社會名流3.0驅動程序[商]不支持laravel /社交名媛
隨着每一個新的社交名媛提供我加我的錯誤:將socialiteproviders時
Driver [provider] not supported.
例如/抽搐3.0我會得到錯誤:
Driver [twitch] not supported.
不過,我可以使用已經內置於社會名流的提供者,github上,例如按預期工作。
我試過三種不同的提供者,每次都得到相同的結果,我做錯了什麼?
這裏是我的路線:
Route::get('/auth/bnet', '[email protected]');
Route::get('/auth/bnet/return', function() {
$user = Socialite::driver('battlenet')->user();
dd($user->accessTokenResponseBody);
});
Route::get('/auth/git', function() {
return Socialite::driver('github')->redirect();
});
Route::get('/auth/twitch', function() {
return Socialite::with('twitch')->redirect();
});
這裏是我的$從我EventServiceProvider聽:
protected $listen = [
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
// add your listeners (aka providers) here
//'SocialiteProviders\Battlenet\[email protected]',
'Reflex\SocialiteProviders\BattleNet\[email protected]',
'SocialiteProviders\Twitch\[email protected]',
],
];
我已經加入SocialiteProviders \管理\的ServiceProvider ::類,我的供應商的應用程序陣列.php,我在app.php中添加了Socialite外觀('Socialite'=> Laravel \ Socialite \ Facades \ Socialite :: class)到我的別名數組中,並添加了相應的鍵給我的.env