I am trying to use Laravel socialite and login with Goodreads. I am getting the error Driver [goodreads] is not supported. I followed this documentation https://socialiteproviders.netlify.com/providers/goodreads.html All stackoverflow questions I have looked up are in refrence to not adding Laravel\Socialite\SocialiteServiceProvider in the app.php but my documentation says to remove it.
In my app.php I added \SocialiteProviders\Manager\ServiceProvider::class, I also added 'Socialite' => Laravel\Socialite\Facades\Socialite::class,
my eventserviceprovider.php is as follows
protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
// add your listeners (aka providers) here
'SocialiteProviders\\Goodreads\\GoodreadsExtendSocialite@handle',
],
];
My login controller
/**
* Redirect the user to the Goodreads authentication page.
*
* @return \Illuminate\Http\Response
*/
public function redirectToProvider()
{
return Socialite::with('Goodreads')->redirect();
}
/**
* Obtain the user information from Goodreads.
*
* @return \Illuminate\Http\Response
*/
public function handleProviderCallback()
{
$user = Socialite::with('Goodreads')->user();
$accessTokenResponseBody = $user->accessTokenResponseBody;
dd($user);
}
my routes web.php
Route::get('login/Goodreads', 'Auth\LoginController@redirectToProvider');
Route::get('login/Goodreads/callback','Auth\LoginController@handleProviderCallback');
Please let me know what I am missing. Let me know if you need to see anything else.
Thank You