We are using Firebase on our project and we want only users who recieved an email invitation to be able to access register page and create a profile afterwards. Can you do that using firebase?
Asked
Active
Viewed 71 times
1 Answers
0
There is nothing built into Firebase Authentication to allow only users you've invited to sign up. When the email+password provider is enabled, anyone can call the API and register.
What you can do though is have a list of the invited email addresses in an online database somewhere (such as Firebase's Realtime Database of Firestore) and check against that list whether a user is authorized after they have signed in.
For an example of how to limit access to the database to specific users, have a look at:
- for Realtime Database: How do I lock down Firebase Database to any user from a specific (email) domain?
- for Firestore: Restrict Firestore gmail sign in to specific domain

Frank van Puffelen
- 565,676
- 79
- 828
- 807