How to use Laravel Socialite in depth

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:

'LaravelSocialiteSocialiteServiceProvider',

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

'Socialize' => 'LaravelSocialiteFacadesSocialite',

About the author

Deven Rathore

I'm Deven Rathore, a multidisciplinary & self-taught designer with 3 years of experience. I'm passionate about technology, music, coffee, traveling and everything visually stimulating. Constantly learning and experiencing new things.

Pin It on Pinterest

Shares