I am using the accounts-entry, accounts-ui, accounts-facebook packages and need to have the signup code feature for Facebook. Anyone successfully done this?
In it's simplest form, I just need a link (that I can dynamically generate) that will grant users access to my app. Then, on my homepage, I need a login button that will only allow those who have already gained access to my app in, and not allow those who don't have access. So basically a button that grants access to my FB "app" and a button that logs in only those who have access.
Create a new collection called "allowedUsers" or something. Add users to this collection who "click the button at a private link".
Then, on the Accounts.onCreateUser(func)
callback, verify* that the user attempting to login using facebook exists inside the "allowedUsers" collection. If they don't, then just throw new Meteor.error(500, 'User isn't allowed to sign up through facebook')
(an account is not created for the user in this instance).
See the documentation on Accounts.onCreateUser(func)
for more details.
http://docs.meteor.com/#accounts_oncreateuser
*When I say verify, there are multiple ways to do this, but none are infallible to my knowledge. It would be up to you to determine if the person you added to your "allowedUsers" collection is truly the person signing up through facebook.