I did it using custom sign-in/up but it should work even with kinde's default pages you'll just need a little extra
So what I did when making an invitation auth flow was :
- create an invitation link like
www.my-domain.com?ref=12345
(ref here is an id or something that points to the referer user in my DB) - send the link via sms / mail
- when someone clicks the link he is redirect to a custom page like
- Here using my custom sign-up or even Kinde Registerlink you make the user registers himself but you'll pass an argument either to your custom function or as a props on RegisterLink with my callback in which i'll add the ref URL param. So it will look like
postLoginRedirectURL="www.my-domain.com/register/callback?ref=12345"
- On the callback i'll have the logic to get check if there is a ref url param. If so then I'll attach the referer id to the referee. In the end it will let me know User B has registered with a referral link from User A (id 12345)