-1

I would like to know how to build a website with an access limited to people who received an invitation link. I am using the Parse.com backend and hosting so, I won't use PHP and MySQL. Currently, anyone can "Login with Facebook".

I would like each user to be able to invite only 5 friends (for example) and to limit access to users with an invitation code or link.

Question: is there an existing code or JavaScript library I could use to do this?

Thanks a lot.

vpx
  • 380
  • 1
  • 5
  • 14

1 Answers1

0

I am not aware of any library that does this but it shouldn't be too hard.

  1. The user will click on invite friends and then enter the friends email addresses
  2. The back end will create entries in the invites db table. You can use the 'objectId' that Parse.com automatically sets as the invite ID.
  3. The link in the invite email will be something like http:///signUp?inviteId=jh2u344232

  4. If the user navigates to the Url and it does not have an inviteId then display an error message

  5. If the inviteId has all ready been used then display an error message
  6. If the inviteId is no longer valid then display an error message.
Alon Raskin
  • 206
  • 2
  • 5