#Firebase

1 messages · Page 1 of 1 (latest)

agile nebula
#

;

#

@pale lion Could you add a line before you initialize firestore like this:
console.log(app.options);

pale lion
#

sure let me give it a try.

agile nebula
#

ah indeed, just went on it and there seems to be an issue:

#

Oh by the way

#

You should put the Firebase configs in a .env file

#

because currently all the configs are available on the client side

#

which isn't dangerous or anything

#

But it means that your users can access your dev environment

#

And they could mess with your database and stuff like that x)

pale lion
#

We will be doing it after CI completion. And Its not available to users currently.

agile nebula
#

Hmm I do see it though

#

Ah you mean it's just temporarily open, not to all users

#

got it

pale lion
#

yeah internal users only.

agile nebula
#

this one is the prod one?
"mozart-ba9d4.firebaseapp.com"

pale lion
#

yes

agile nebula
#

wait

pale lion
#
let app;

console.log("Before initializeApp",app?.options);

if (!getApps().length) {
    app = initializeApp(firebaseConfig);
} else {
    app = getApp();
}

console.log("After initializeApp",app?.options);

Above is added and deployed

agile nebula
#

i might be wrong here, 2s xD

pale lion
#

Can you let me know above the debugging process so that i can go deeper and understand it and also for future reference.

agile nebula
#

@rugged jackal

#

(adding bedros because he's good at this stuff)