angularfire
angularfire copied to clipboard
Feature Request: Firebase SDK Auto Config
trafficstars
I would like to propose Firebase SDK AutoConfig as an option when initializing the app:
AngularFireModule.initializeAppWithAutoConfig(),
Right now, I have a workaround by adding this 2 lines in package.json so that the build process will pull the config from my Firebase project:
"build": "npm run getFirebaseConfig && ng build",
"getFirebaseConfig": "firebase apps:sdkconfig web --json > ./firebaseConfig.json",
Then in my app.module.ts:
import * as firebaseConfig from '../../firebaseConfig.json';
AngularFireModule.initializeApp(firebaseConfig.result.sdkConfig),
It works but it has an extra immediate step to generate the firebaseConfig.json. So, it will be great if AngularFireModule takes care of it.
Reference: https://firebase.google.com/docs/hosting/reserved-urls#sdk_auto-configuration
This issue does not seem to follow the issue template. Make sure you provide all the required information.