Implementing Socialite to allow users to login with Facebook
Keep the track of passwords is not fun. In this section, we are going to make the app allow the user to login using Facebook! Thanks to Socialite this is super easy.
Getting ready
A fresh install of Laravel will do as I am going to work it into my existing comic book app.
How to do it…
- Install the Socialite library. Make sure you read its docs for the steps needed to get the setup at https://github.com/laravel/socialite.
- Set up
config/services.php
to add Facebook: - Make a controller:
>php artisan make:controller FacebookAuthController
- Set up the controller to do some work: ...
Get Laravel 5.x Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.