Laravel 7 Socialite Login with Google Gmail Account

Siddharth Shukla
1 min readMar 7, 2020

--

Hey, Reader Here, I will brief you step by step login with google account in Laravel 7 socialite. in Laravel 7 socialite provides API to login with Gmail account. I will help you step by step instruction. let’s follow the tutorial and implement it.

Step 1: Install Laravel 7

I am going to install Laravel 7 projects.

laravel new google_login

Now I am going inside of the folder

cd google_login

Step 2: Install Socialite

In the second step, I will install Socialite Package using composer that provides API to connect with google account. check below command

composer require laravel/socialite

Once package installs then we should add providers and aliases inside of config file, Now I am going to open onfig/app.php file and add service provider and alias.

'providers' => [
....
Laravel\Socialite\SocialiteServiceProvider::class,
],
'aliases' => [
....
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
],

Read More: https://realprogrammer.in/laravel-7-socialite-login-with-google-gmail-account/

--

--

Siddharth Shukla
Siddharth Shukla

Written by Siddharth Shukla

I'm a Full Stack Engineer based in India ☀️, working at Kreativ Street. I'm a coding passion focused on Python, specifically Laravel & Django.

No responses yet