How to build a beta invite system that includes oauth logins

Howdy all, I’ve been trying to figure this out:

I’m trying to build a beta invite system in Meteor that only allows account creation (via any of the accounts packages, such as accounts-facebook or accounts-password) from a certain template, acceptBetaInvitation. The trick is that I need to be able to also allow logins for those who have already accepted but deny logging in anyone else.

I’d be surprised if I’m the only one interested in doing this, because otherwise beta users are forced to sign up for an accounts-password account, which has greater friction than Oauth logins.

https://themeteorchef.com/recipes/adding-a-beta-invitation-system-to-your-meteor-application/

1 Like

I’m familiar with this tutorial. It does not accommodate OAuth logins, only accounts-password.

It’s tricky as hell! Are sessions persisted between the transition from anonymous to signed in?

If that’s the case, maybe you can save the beta-token to the user session and on sign in, associate the beta-token to the oauth’d user.

Hm… that could potentially work using accounts-anonymous, which I had looked at before but decided not to bother with for the moment. I might have to revisit that line of thought.

Nonetheless, if there’s a simpler way, that’s better. Seems like it just boils down to “how do I pass this one extra flag into the validation callback”…

OK, after a month of work, I figured this out and packaged it: Easily allow or deny account creation—even for OAuth services

2 Likes