Skip to main content

Posts

Showing posts from February, 2020

Add Login with Google to your Laravel project using socialite

Laravel Social_login with google: In this tutorial we’re going to add authentication via Google to a Laravel app. We’re going to use Socialite and start from scratch. 1. Create Laravel app  Create a new laravel app with a database and get everything up and running. Click here for a guide on how to create a Laravel app from scratch  2. Install Socialite  Install socialite by running the following command on the command line.  composer require laravel/socialite If you want to learn more about socialite  click here . 3. Configure Laravel  Once you have your project up and running, it is time to start our project. First add credentials to config/services.php. Socialite supports Facebook, Twitter, LinkedIn, Google, GitHub and Bitbucket. Other providers require packages from the community, which are all listed here . These providers follow the OAuth 2.0 spec and therefore require a client_id , client_secret and redirect url. We’ll obtain these in the nex