In the company I am working for, we provide a solution for other companies, and we want each company to have a separate instance of that solution, this includes a separate database instance, the database is Firebase, this choice of creating a new separate instance is required due to data privacy laws of the country we work in.
I am working on a script that when triggered by the new client SignUp, it starts the creation of new solution instance, including the creation of the new Firebase
project, and I am using firebase-tools CLI
and gcloud CLI
.
The project creation happens correctly, and the admin account is created, the only remaining thing is to allow the admin to be able to login to the new Firebase
project. This is usually done manually from the Firebase web console
, by enabling a login provider, an Email&Password
login provider in my case. This part of the process is so not automated, because I can't find the command that I should pass to Firebase-tools
or gcloud ClI
to enable a login provider in a Firebase
project.
What is a command that you can pass to Firebase tools
or to gcloud CLI
, to change firebase project confguration to enable a signin provider ? signin usng Email&Passsword
in this case .. Or is there a way to do it programmatically using Google client libraries
?
From looking at the REST API for the Google Identify Platform, I don't immediately see a call that shows email+password authentication. Unless I'm overlooking something this means it might not be possible to programmatically enable this provider through a public API.
From checking what the Firebase console does, it seems it handles the provider configuration through the https://identitytoolkit.clients6.google.com/admin/v2/projects/<projectid>/config
endpoint, but I'm not sure that is part of the public API.