Authenticate with Firebase using Password-Based Accounts using Javascript
Sign in a user with an email address and password
Clone this repo
git clone https://github.com/rdxkeerthi/login-firebase.git
cd login-firebase
npm install
npm start
Create a new project in the Firebase console
Create a new web app
Get the config object from the Firebase console
Create a new file called script.js in the root of your project
Add the following code to script.js
const firebaseConfig = {
apiKey: "ADD YOUR KEY ",
authDomain: "ADD YOUR DOMAIN",
databaseURL: "YOUR URL",
projectId: "YOUR ID",
storageBucket: "YOUR DATA",
messagingSenderId: "YOUR MESSAGE",
appId: "YOUR API ID",
measurementId: "YOUR M ID"
};
{
"rules": {
"user":{
"$uid":{
".read": "$uid === auth.uid",
".write": "$uid === auth.uid"
}
}
}
}
Sign in a user with an email address and password
Host the app on a server firebase
sudo apt-get update
sudo apt-get upgrade
sudo npm install -g firebase-tools
firebase login
firebase use --add [your id]
firebase init hosting
firebase deploy --only hosting
firebase deploy
Firebase hosting is a service that allows you to host your web app on a custom domain. You can deploy your app to Firebase hosting using the Firebase CLI.