tapglue / snaas

Tapglue Social Network as a Service (SNaaS)
https://www.tapglue.com
Apache License 2.0
67 stars 22 forks source link

Invite flow #38

Closed xla closed 7 years ago

xla commented 7 years ago

Invite flow

To enable a better on-boarding experience we need a way to correlate users and their inviter. One way is to keep a list of invites of a user that stores a unique id (e.g. facebook id, or generate random identifier) which can be kept through until the invitee hits the signup. If the invitee signs up and the conenction to the inviter is preserved we can automatically create connections for those so they can hit the ground running.

API

To create an invite from the current user the following endpoint should be called. The key and value are entirely up to the caller to decide, but must match one of the key/value pairs in the social_ids of the invitee during signup. Given the Facebook id of the invitee is known:

> POST /me/invites
{
    "facebook": "1234"
}

< 204 No Content

Then during singup the same information should be provvided for the user.

> POST /users?invite-connections=friend
{
    ...
    "social_ids": {
        "facebook": "1234"
    }
    ...
}
hellozimi commented 7 years ago

I think it would be nice to get a response on POST /me/invites including some kind of unique identifier which we can pass onto the deeplink url, or if I pass a randomized hash of some kind into the post body which can later be used in the deeplink to match the invitee with his/her BFF 💥.

mstrengnell commented 7 years ago

Checkez out. Bc of all the checks. Also: Love the BFF 💥 reference. MVP