我使用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