Search code examples
androidfirebasefirebase-invites

is there a way to only send a Firebase invite if the user does not exist


Is there a way to ask the user to input the contact, then check Firebase database to see if a user matching that email exists already, before sending the invite.

I basically wish a workflow like so:

User A invites User B to link with them on the app.

If User B has an account, the request is added to their account.

If User B does not, it instead sends an email invite requesting them to install, the app will use the invite to mark the account after it has been made


Solution

  • The application does not have any control over which users are invited once the contact picker dialog is launched, so your request is not possible in the current API.

    To make a good experience for all users, you should include meaningful messages deep links in the invitation so that when an existing user clicks on the email they are taken to a new experience in your app and feel that the email was still useful.