Today we are going to implement social login in laravel with the Facebook platform. Facebook is the most popular social media platform. In this implementation, we are using the socialite package mostly used to connect social media to the laravel application.
- Install Package in laravel
Run the following command to install the socialite package in your application.
composer require laravel/socialite
You need to add the below line of code inside the config/app.php file.
$providers= [ ...... Laravel\Socialite\SocialiteServiceProvider::class, ...... ]; $alias = [ ...... 'Socialite' => Laravel\Socialite\Facades\Socialite::class, ...... ]