Open SachaG opened 9 years ago
I would really like this system. It could be used in a classroom type situation. Where a teacher gives a sign up URL to students and they will then sign up using that URL and be enrolled under the class.
So, now thinking about it, this could be broken down into two different systems.
I'm not entirely sure if organizational invites should be in this package or as a separate package in itself. Thoughts @SachaG @queso?
What would be the difference exactly? I was thinking the package would provide a simple API to generate invite codes, and the app would be free to use them however it wants.
The difference I see there is that the first option gives a way to give invites to the application while the second is a way for users to invite someone to sign up and be apart of a certain group or organization. So, in the second scenario, there is possibility of adding fields. Like in the teacher example I put, it would be like this:
class
field that is filled in automatically while registering the user (The field could be anything)As opposed to this scenario:
I think for case 1 people could just add a callback to accounts_oncreateuser
? I don't know, to me it seems a bit too specific a use case to be handled by the package.
Yeah, I agree with you. Thanks for the input. This token system could allow for people to create their own little referral / affiliate system out of it.
Now that Telescope uses accounts-entry, I'm thinking about how to make it play nice with the invite system. The invite flow looks something like this:
Right now we track all invited emails in an
Invites
collection, so step 4 can only happen if Bob uses the same email Alice entered. That's not great because it means Bob can't sign up via Twitter, Facebook, etc.A better system would be generating a special token at step 2 and using that to invite Bob to sign up via a special URL (i.e.
http://site.com/sign-up/a52s76hdia62z
).So my point is: maybe the token could be generated and handled by accounts-entry?