1. Home
  2. Docs
  3. Ionic Firebase Chat
  4. Firebase Setup

Firebase Setup

In this steps, we’re going to setup our firebase project & obtain required firebase key

Step 1: Create new firebase project

  • Navigate to https://firebase.google.com/ & login with your google account
  • Add/Create new Project
  • Update your project name & required details & Create project

Step 2:

  • After create the project, you need to add web project
  • Copy the credential
  • Update your credential with project/src/environments/environment.prod.ts

Step 3: Enable Email Login

  • Navigate to Authentication from sidemenu
  • Choose SIGN-IN Method
  • Enable Email/Password login then save your settings

Step 4: Update Firebase Rules

  • Choose Database from side menu
  • Choose Firebase Realtime Database (not the firestore) & Navigate to rules page
  • Update the following rules & save
{
    "rules": {
    ".read": true,
    ".write": true
    }
}

 

Step 5: Update Storage Rules

  • Navigate to storage from side menu & choose rules
  • Update the following rules & save
service firebase.storage {
    match /b/{bucket}/o {
        match /{allPaths=**} {
        allow read, write: if request.auth != null;
        allow read, write: if request.auth == null;
        }
    }
}