Is it safe to expose Firebase apiKey to the public?

The Firebase Web-App guide states I should put the given apiKey in my Html to initialize Firebase: // TODO: Replace with your project’s customized code snippet <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> By doing so, the apiKey is exposed to … Read more

Google firebase check if child exists

Edit 2; worth putting on top: I think it is worth mentioning that this is actually downloading all data at this snapshot just to check whether any data exists. You should be mindful here. If the reference is huge (e.g. actually the root reference and not a specific child/property) then you should either find a deeper node you … Read more