This is the code that indicates Firebase to configure a Web App that can read Real Time Database data with the Javascript SDK:
// Set the configuration for your app
// TODO: Replace with your project's config object
var config = {
apiKey: "apiKey",
authDomain: "projectId.firebaseapp.com",
databaseURL: "https://databaseName.firebaseio.com",
storageBucket: "bucket.appspot.com"
};
firebase.initializeApp(config);
// Get a reference to the database service
var database = firebase.database();
I would like to make an implementation of firebase tag on a website with shared hosting. I have tested the code with my data and it works.
But as you can see, the APIKEY
of the project and the URL of the database would be exposed on the client .
- Is this dangerous? What possible dangers could there be?
- Is there any way to avoid it? (I would have to use the Javascript SDK, I do not know how to use Node or similar and I want to show the data in a normal web page that already exists in Wordpress, I could do it with PHP, but I did not find anything about PHP in Firebase).