Open Your firebase console and click on your project name then you will get below screen
Click on "Add Firebase to your web app" Button then you will below type of code :
Please copy selected text that contain your proejct's apiKey, authDomain, databaseURL, projectId, storageBucket, messagingSenderId etc.
Then you need to replace new code with this file :- js/firebase.js file
Please see below screenshot
In firebase console click on "Authentication" tab. and enable "Email/Password" as a sign in method. you also need to add user that you want to allow in script.
For this refer below screenshot.
- Yes. That's its now you are able to login via script and manage your firebase database. :)