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

Follow below mentioned steps to easily setup Firebase database and enable chat in your Dating app :

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 Add Project

Step 5 : Enter specific details, and click on Create Project

Step 6 : Click on Continue

Step 7 : Click on Add Firebase to your web app 

Step 8 : Enter App nickname

Step 9 : Click on Register app


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

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



Step 12 : Click on Develop menu

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

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

Step 15 : Once done, click on Save button 

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

Step 17 : Click on Create database in Realtime Database

Step 18 : Click on Enable 

Step 19 : Click on Rules 

Step 20 : Delete the entire code 

Step 21 : 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 as 9.7 out of 10 with 2076+ Excellent reviews. You can post your own review for Appy Pie on Trustpilot by clicking on Write a review.