I want to implement a custom invitation flow. The flow goes like this:
The user invites someone by email. In our database, we create a new user and organization for that email and set the status to “pending.”
We then send an invitation email to the invited user with a link. When the user clicks on that link, they are redirected to the Auth0 login page to accept the invitation and log in.
After logging in, Auth0 will either redirect the user to our page or send a request to our API. We will then update the status and redirect the user to the home page.
The invitation link should be for one-time use only, and only the invited user can join.
We wanna follow industry standards with this flow.
Could you share if there was a specific step you are unsure of how to integrate into your flow?
In essence, you will need to create the user on their behalf and send them a password reset email that has been repurposed as an invitation to set their passwords and sign in.