Live data from Hacker News

Learn OAuth by building a client with Node.js

annotate.dev

1–10 of 29 posts

Re: Learn OAuth by building a client with Node.js

#3
I recently started writing an API client for some endpoints protected with Oauth2 and it was an absolute pain at first. Very few examples were available that took into account their quirks, and I ended up relying on a random git repo I found with a working implementation written in PHP.

Re: Learn OAuth by building a client with Node.js

#4

Hey HN, author here. When I was first learning OAuth, I found that all the guides were text-heavy and lacked code. I personally learn better from code, so I created a code-first guide. Let me know if you have any feedback!

This looks great! I'll surely come back to it later.

How much of the process can be pushed to server side? (Sorry, I don't speak JS.)

Re: Learn OAuth by building a client with Node.js

#8

Hey HN, author here. When I was first learning OAuth, I found that all the guides were text-heavy and lacked code. I personally learn better from code, so I created a code-first guide. Let me know if you have any feedback!

This looks great! I'll surely come back to it later. How much of the process can be pushed to server side? (Sorry, I don't speak JS.)

Pretty much all of it! The JS in this walkthrough is all server-side. I tried to keep the JS itself simple so that someone unfamiliar with the language could have an easy time following the code.

Re: Learn OAuth by building a client with Node.js

#9

Hey HN, author here. When I was first learning OAuth, I found that all the guides were text-heavy and lacked code. I personally learn better from code, so I created a code-first guide. Let me know if you have any feedback!

This looks great! I'll surely come back to it later. How much of the process can be pushed to server side? (Sorry, I don't speak JS.)

It’s all server side. It’s written using express which is a web server framework built on top of nodejs

Re: Learn OAuth by building a client with Node.js

#10

I recently started writing an API client for some endpoints protected with Oauth2 and it was an absolute pain at first. Very few examples were available that took into account their quirks, and I ended up relying on a random git repo I found with a working implementation written in PHP.

This was my experience as well. I've previously blindly followed instructions from OAuth libraries, but it frustrated me that I didn't fully understand what was going on.
Post reply on HN