OAuth2 to connect to a 3rd party API, separate from user accounts


#1

Hi!

I’m currently building an integration with Greenhouse.io’s ingestion API which authenticates via OAuth 2.0.

In my database, I have a collection for both users and companies where multiple users belong to one company. I want to easily allow any user associated with a company to authenticate via OAuth to the Greenhouse API, allowing any user across the company to access the API.

My assumption is that I will need to somehow authenticate with OAuth and then store the keys in the customer document as opposed to the user document. How would I go about doing this with Meteor 1.3?

I’m using

  • Meteor 1.3
  • Blaze / spacebars for the frontend.

Thanks :slight_smile:


#4

Anybody have any idea on how to approach this?


#5

Still trying to figure this out, does anyone know how I’d be able to take a stab at this?


#6

Would really love some help!


#7

Would anyone be able to help?


#8

I will name my firstborn child in your honor if you can help me with this. :slight_smile:


#9

Still haven’t figured this out, would someone mind taking a stab?


#10

Still haven’t figured this out– does anyone have any idea how I’d approach this?


#11

Anyone have any idea how to approach this :-/


#12

Take a look at this

http://robfallows.github.io


#13

I’m also trying to figure this out, so I dived in the Meteor code.

As far as I’ve read and I understand, Meteor oAuth is tightly integrated with Meteor.user (creating a user and logging him in). Which sucks if you try to do anything else. It’s also limited, because it doesn’t allow you to customise the user object via the Accounts.onCreateUser hook like you can do with password signup.

Fortunately there’s NPM these days, for example try this (haven’t tried myself yet…) :slight_smile: