This oauth with google has been implemented with expressjs, passport-google-oauth and ejs as the templating engine.