Full-Stack Web Development with Vue.js and Node

(singke) #1
Building OAuth Strategies with passport.js Chapter 7

Creating and setting up a Google app


Just as we did for the Facebook and Twitter strategies, to be able to use the Google Strategy,


we have to build a Google application. The developers, portal for Google is at https:/​/


console.​developers.​google.​com/​.


Then, click on the drop-down list of the projects, which lies at the top-left corner of the
page. A popup will show up. Then, click on the + icon to create a new application.


You just have to add the name of your application. We will name the application


movieratingapp, as Google does not allow underscores or any other special characters:


When the application gets created successfully, click on Credentials and Create and then


on OAuth Client ID to generate the app tokens. To generate the tokens, we will first need
to Enable the Google+ API via Developer Console at https:/​/​console.​developers.


google.​com/​.

Free download pdf