hide firebase config file from react app.

1,124 views
Skip to first unread message

virendra singh

unread,
Jul 17, 2018, 9:53:31 AM7/17/18
to Firebase Google Group
HI Team, 

I am new in reactjs and firebase web app development. I need to hide firebase app config.But I am unable to do that. 

please help with that. 


<script src="https://www.gstatic.com/firebasejs/3.0.2/firebase.js"></script>
<script>
  // Initialize Firebase
  var config = {
    apiKey: '<your-api-key>',
    authDomain: '<your-auth-domain>',
    databaseURL: '<your-database-url>',
    storageBucket: '<your-storage-bucket>'
  };
  firebase.initializeApp(config); 
</script>


I do not want to shoe this config on view source.  

Michael Bleigh

unread,
Jul 17, 2018, 11:10:55 AM7/17/18
to Firebase Google Group
The client-side Firebase config is considered untrusted and safe to disclose publicly. There is no foolproof way to obfuscate data in a JavaScript client, as it's trivial for a user to just open a console and pull the data out of memory. Firebase has been designed with this in mind and your app is not made less secure by sharing the client config.

This underscores the importance of properly using security rules to protect your data in Firebase databases and Cloud Storage, however.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/e287125f-04c3-4fc3-aa57-217e2e83c156%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages