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 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…)