Harvey Connor
Harvey Connor

Reputation: 157

Laravel Socialite - Driver [youtube] not supported

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.

Here's my controller file:

<?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);

   }


}

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!

Upvotes: 2

Views: 6326

Answers (1)

Harvey Connor
Harvey Connor

Reputation: 157

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

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

Note: I needed both of them!

Upvotes: 4

Related Questions