Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User registration webhook (per-application) #12

Open
zomglings opened this issue Aug 6, 2021 · 2 comments
Open

User registration webhook (per-application) #12

zomglings opened this issue Aug 6, 2021 · 2 comments
Assignees

Comments

@zomglings
Copy link
Member

Each application should have the option of registering a webhook endpoint to which we send an event every time a user registers.

The event can have the following schema:

{
    "event_type": "user_registration",
    "user_id": "<id>"
}
@zomglings
Copy link
Member Author

This is useful for applications external to Bugout.

@zomglings
Copy link
Member Author

We will use it in Moonstream like this:

  1. Moonstream application will register webhook URL with brood: https://api.moonstream.to/webhooks.
  2. Every time a user registers, Brood will `POST https://api.moonstream.to -H "Content-Type: application/json" -d '{"event_type": "user_registration", "user_id": "<user_id>"}'
  3. Moonstream, whenever it receives this webhook, will send the user a welcome email, set up the user's default subscriptions, and set a state in the database indicating that user onboarding was set up.
  4. (Not relevant to Brood, but worth writing for @peersky) Moonstream frontend will check user's onboarding status. If onboarding has not even been set up, it will display a message to the user indicating that we are setting things up for them. If onboarding has been set up but user has not interacted with it, we will show them onboarding flow (including default subscriptions). Once user finishes onboarding, frontend will send a message to backend saying that onboarding is complete, and backend will store this in the user's onboarding state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants