Laravel Socialite-不支持驱动程序[youtube] [英] Laravel Socialite - Driver [youtube] not supported

查看:149
本文介绍了Laravel Socialite-不支持驱动程序[youtube]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试将Socialite Manager驱动程序用于YouTube身份验证时遇到问题. 这是我遇到的错误:

I'm having an issue when trying to use the Socialite Manager driver for YouTube Auth. This is the error I'm faced with:

InvalidArgumentException in Manager.php line 90:
Driver [youtube] not supported.

这是我的控制器文件:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;

use Socialite;

class SocialAuthController extends Controller
{
   public function redirect($provider)
   {

        return Socialite::with($provider)->redirect();
   }

   public function callback($provider)
   {
        $user = Socialite::driver($provider)->user();
        dd($user);

   }


}

我已成功使用以下默认身份验证进行了尝试:Facebook,Linkedin和google. (Twitter给了我一个错误,稍后我将尝试修复).但我想与YouTube一起使用,非常感谢您的帮助!

I have successfully tried this with the following default authentications: Facebook, Linkedin and google. (Twitter gave me an error that I'll try and fix later). But I would like to get this working with YouTube, any help is greatly appreciated thanks!

推荐答案

结果我忘了在app.php中输入适当的详细信息

Turns out I forgot to put in the appropriate details in my app.php

Laravel\Socialite\SocialiteServiceProvider::class,
\SocialiteProviders\Manager\ServiceProvider::class,

注意:我需要他们两个!

这篇关于Laravel Socialite-不支持驱动程序[youtube]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆