In this tutorial we will learn how to use laravel Socialite that comes out of box in laravel ! stuffs we will be doing is :

  1. Installing Laravel Socialite
  2. Creating an app on your social network of choice
  3. Logging in the user
  4. Storing the user in your database
  5. Updating the user if they update their social profile

Throughout my app I am letting the user log in with either Facebook, Twitter, or Github. There’s a lot to go through so let’s get started!


Installing Laravel Socialite

This is a very straightforward process, to get started with Socialite add the following line to your composer.json file:

"laravel/socialite": "~2.0"

Next, register the LaravelSocialiteSocialiteServiceProvider in your config/app.php configuration file like so:


You may also register a facade in the same file like so:

'Socialize' => 'LaravelSocialiteFacadesSocialite',