Is there a way to safely receive the email that they have been authenticated with using a security rule.
Ideally, I wanted to create a rule like:
{ ".read": "auth.google.email.matches(/@example.com$/)" ".write": "auth.google.email.matches(/@example.com$/)" }
So that the entire application or part of the application is protected from the suffix of the email address. It is much easier to manage my application, because users will be granted access based on the email of the company they have, all or nothing.
Alternatively, this is a way to store users โemail address in a database that they then cannot write, I believe that I could achieve a similar process.
source share