angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

Feature Request: Firebase SDK Auto Config

Open cupidchan opened this issue 3 years ago • 1 comments
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

cupidchan avatar May 07 '22 14:05 cupidchan

This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar May 07 '22 14:05 google-oss-bot