A not very slick example of using the Google sign in for server-side apps flow (https://developers.google.com/identity/sign-in/web/server-side-flow).
Also using the google api node js client (https://github.com/google/google-api-nodejs-client).
Put together quicly from the exmaples scattered over the google developers documentation.
Mainly just console.log's variables for inspection...
To run locally just create an OAuth 2.0 client ID with javascript origin http://localhost:5667 at the google developers console.
You will need to enable the google+ API for your project.
Ammend CLIENT_ID
and CLIENT_SECRET
as approirate in main.js
and index.html
.