Wednesday, October 21, 2015

Google API oauth flow with node.js

I think that video should speak for itself.


I had 25 minutes before I leave for BJJ (brazilian jiu-jitsu) and I was pretty sure I'll manage on time but I've made so many little mistakes in the process and I was a few minutes late. Shame on me - on the other hand I really liked the time constraint and rushing through London.

I should have known better... In reality I make these type of mistakes all the time. I think that it is a nature of work. Don't get me wrong but majority of the people I work with make these type of mistakes too - typos, discrepancies and the true strength is in overcoming challenges and working one step at a time - you probably noticed how many times I've reloaded the browser (all the time).

Enough talking. You have the video, you have the code: https://github.com/stefek99/google-API-demo-tutorial

(readme.md should explain some technical details)

That is just the beginning. You still need to store token somewhere and make actual API calls to use it... From the time perspective everything seems obvious. When starting the amount of components and dependencies can be overwhelming. I knew exactly what to do and even though it took me 37 minutes! (without the video it would be even longer as I would be focusing on other stuff)

Two major files that make it all possible (server and client):




(full source lives on GitHub and of course remember to keep your tokens, secrets and credentials safe)

4 comments:

  1. I preferred the video where you drank your own urine http://www.iamthespecialist.com/2015/10/drinking-own-urine-as-token-of.html?m=1

    ReplyDelete
  2. Looking forward to diving into this

    ReplyDelete
  3. How can i do it for gmail authentication using node.js. Please share the code

    ReplyDelete