I am looking to build an app where the only way a new user can enter the app is if they have been invited by an existing user. Are there any API's, tutorials or resources that can help me achieve this. I am using Firebase as my backend and I know it has phone number verification, but I want only invited users to be given an access code to access the app.
If registration is only possible by invitation, then there are a few possibilities:
Your registration page asks for an invitation code. Such a code could only be generated and sent by a logged-in user and should be one-time-use.
As part of the invitation, you send a one-time-use link to a "registration page". I put the registration page in quotes, because you might also do the user creation part when sending the invitation and then use the password recovery mechanism of your framework to complete the registration process.