REFERRAL_INVITE
email inside the email.config.ts
file.
Here’s how it works:
If a user is on the app/refer
page and submits the form - the following email will be sent to his friend:
auth/sign-up
page which includes the referralCode
in the URL like so */2mrw.dev/auth/sign-up/mode=magic-link:ref=5ZHA81
.
If his friend now signs up with the referral code our processReferralSignup
fn will be called where we can add some custom code to decide what the friend / or both users should get for a successful referral:
This boilerplate doesn’t come with rewards out of the box. You’ll have to create the custom logic for it as referral rewards are quite different for each app.For instance, for Reelify, I’ve decided to give both users video credits to create more videos. However, for another app that could be giving one month for free.