Categories: Software Development

node-oauth-libre 0.9.15 ALPHA

I’m very excited. After starting a fork of node-oauth-libre a month ago, I have implemented a feature that many people have wanted for months: Promises instead of callbacks.

Promises are a way of escaping from Node’s callback hell.

node-oauth-libre now has support for promises thanks to the bluebird library. This support is optional and does not break compatibility with existing uses of node-oauth. To use it, you must explicitly import it.

Click here to check out the release notes for node-oauth-libre 0.9.15 ALPHA. The install and usage instructions are there and a link to some examples.

Here’s an example of using OAuth 1.0 promises:

https://gist.github.com/omouse/0bf79ac1d1edf6a036482e6cb0de9a8f

Categories: Portfolio, Software Development

node-oauth-libre

Update: node-oauth-libre 0.9.15 ALPHA is out, please download and test and report any issues with the new promises support.

In the last month I was looking for a Node.js library for¬†authenticating with APIs that use OAuth 1.0a or OAuth 2.0, and found a pretty good library: node-oauth. It was great but it would have been nicer if it had promises instead of callbacks, and maybe if the OAuth 2 class implemented more methods. I started to worry that the library didn’t seem maintained, there were lots of issues and pull requests that are still waiting for a response or to be merged into the code.

I’ve also been reading Free as in Freedom and The Cathedral and The Bazaar and the hackers of each book, Richard M. Stallman and Eric S. Raymond, both took other projects and improved them and contributed back their changes and improvements to the community. With their maintenance, the projects (Emacs and fetchmail) had vibrant developer and user communities.

So I have decided to basically adopt the node-oauth project under the new name node-oauth-libre. This blog post is the announcement that I’m doing this and yes that means I’ve really forked the code. The node-oauth-libre project uses the GPL version 3, with the original code and patches to the original project licensed under the MIT license.

Continue reading “node-oauth-libre”