Skip to content

Firebase Messaging - Is it safe to store config variables in service worker? #4959

Answered by dbanisimov
kush-daga asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, it is okay for them to be exposed. They are public by design.

Even more, if you're using Firebase Hosting they'll be exposed automatically under a reserved path /__/firebase/init.json. For example check out the modular SDK website by the Firebase team themselves: https://modularfirebase.web.app/__/firebase/init.json

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kush-daga
Comment options

Answer selected by Feiyang1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants