Change connection file on the fly
ayman-elmalah opened this issue · comments
Ayman Elmalah commented
When i changing the connection automated and update file credentials on the fly for each tenant
It return to me Unable to create the messaging service without a project ID
I need to change the connection on the fly for our clients using middleware and config set
Jérôme Gamez commented
That's a use case not supported by the package out of the box, but if you don't share how you are changing the connection on the fly, I'm not sure what you expect me to do here
use Kreait\Firebase\Factory;
$factory = (new Factory)
->withServiceAccount($onTheFlyCredentials)
->withDatabaseUri('https://on-the-fly-rtdb.firebaseio.com');