Just like we did for Facebook, we can integrate our application to enable login using Google.
Using Google for authentication
Getting ready
Start by building over the last recipe. It is easy to implement Google authentication–simply leave out the Facebook-specific elements.
Now create a new project from the Google developer console (https://console.developers.google.com). In the APIs and Services section, click on Credentials. Then, create a new client ID for the web application; this ID will provide the credentials needed for OAuth 2 to work. You will also need to configure the OAuth consent screen before a client ID can be created, as shown in the following screenshot: