I have created simple firebase chat system using pure javascript , Everything is working fine , But I have below code in javascript open to everyone.
  var config = {
    apiKey: "AIzaSyD0Bm91234567678srKwjUGrpu35dgIIE",
    authDomain: "example-26847.firebaseapp.com",
    databaseURL: "https://example-26847.firebaseio.com",
    projectId: "example-26847",
    storageBucket: "example-26847.appspot.com",
    messagingSenderId: "937123954572"
  };
But I feel like this is vulnerable to hacking , How do i protect it , I have only php web server.