FirebaseExtended / reactfire

Hooks, Context Providers, and Components that make it easy to interact with Firebase.

Home Page:https://firebaseopensource.com/projects/firebaseextended/reactfire/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can we fetch firebase config by api?

mohitsud opened this issue · comments

I have a multi tenant application where each tenant has its own unique firebase instance.

I would like to retrieve the firebase config data via an api call. I will be able to secure this as my api will receive a separate Auth token.

Could anyone provide guidance on how I can make the API call before initializing firebase?

commented

If you're using Firebase Hosting, your Firebase config is available at the reserved /__/firebase/init.json path. For example, https://<firebase-project-id>.web.app/__/firebase/init.json or <your-custom-domain>/__/firebase/init.json.

This can be found in the Firebase docs at the bottom of the SDK auto-configuration section.

Thank you.