How to setup Firebase database for enabling chat in Chat Room?

Follow below mentioned steps to easily setup Firebase database and enable chat in Chat Room :

Step 1 : Go to Firebase

Step 2 : If you have a Firebase account, Signin, else Signup

Step 3 : Click on Get Started 

Step 4 : Click on Create a Project

Step 5 : Enter your project name and tick mark the checkbox to accept terms and conditions

Step 6 : Click on Continue

Step 7 : Select "Set up Google Analytics for my project" and click on Continue

Step 8 : Open Configure Google Analytics dropdown menu

Step 9 : Choose your Google Analytics account or create a new account, and click on Create Project

Step 10 : Click on Continue

 

 

Step 11 : Click on Add Firebase to your web app 

Step 12 : Enter App nickname

Step 13 : Click on Register app

 

Step 14 : Here is your apiKey, authDomain and databaseURL. Copy all the keys and click on Continue to Console

Step 15 : Paste the copied keys in My Apps >> Editor >>Chat>>Chat Room>>Enter apiKey, AuthDomain and DatabaseURL section.

 

 

Step 16 : Click on Develop menu

Step 17 : The Develop dropdown menu will open on the left hand side panel, click on Authentication

Step 18 : Click on Sign-in Method, then enable Anonymous 

Step 19 : Once done, click on Save button 

Step 20 : In Develop menu on the left hand side panel, click on Database 

Step 21 : Click on Create database in Realtime Database

Step 22 : Click on Enable 

Step 23 : Click on Rules 

Step 24 : Delete the entire code 

Step 25 : Now enter the following code, and click on Publish

{
  "rules": {
    ".read": "auth != null",
    ".write": "auth != null"
  }
}

Share this :

Was this article helpful?

Reviews on this page are powered by Trustpilot where Appy Pie is rated 4.9 with 2118+ Excellent reviews.You can post a review for Appy Pie on Trustpilot by clicking on Write a review.