Generic OAuth2 in Meteor


I am trying to build a Meteor application where the user would log in (using Meteor login/password default system), and then authenticate via OAuth to a web service just to use their API (so without user/password on this service).

I got some working code for this using Node.js, but I really don’t know how to start to implement this into Meteor. Can anybody help, like to me for example how to get started? Thanks!

The Node.js code: Node.JS Code on PasteBin

You could fork any one of the oauth based account packages (ie facebook, google, meteor accounts etc) and change the endpoints and tweak as necessary.

Here’s one I made for

I also included sources so you can look at how other people did it.

I’m looking at all the packages, and the code is exactly the same. That’s a lot of code duplication if I want 5 services.

Is there really no meteor package that allows me to configure n number of oauth services?