Generic OAuth2 in Meteor


#1

Hello,

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


#2

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.


#3

Here’s one I made for battle.net.

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


#4

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?