Notification Settings

Step 1: Creating Firebase Project

  1. Log into your Email account
  2. Go to https://console.firebase.google.com
  3. Click on Go to Console
  4. Click on Add project 
  5. A popup setting will appear after that -> Complete all settings there -> Finally, Click Create Project

Step 2: Creating Firebase Database

  1. Expand Develop menu
  2. Click on Database
  3. Click on Create Database
  4. A window will appear -> Select Start in Locked mode -> Click on  Enable
  5. Switch from Cloud Firestore to Realtime Database
  6. Click on Rules tab and put the following code to Rule Setting area. You need to replace the default code that is already there. So delete and replace all code. Then click the “Publish” button to complete.
    {
      /* Visit https://firebase.google.com/docs/database/security to learn more about security rules. */
      "rules": {
        "connections": {
          ".read": true,
          ".write": true  
        },
        "messages": {
          "chats": {
             "$messageID": {
               ".read": "!data.exists() || data.child('fUser').val() == auth.uid || data.child('sUser').val() == auth.uid",
        	     ".write": "!root.child('messages').exists() || !root.child('messages').child('chats').exists() || (root.child('messages').child('chats').child($messageID).child('fUser').val() == auth.uid || root.child('messages').child('chats').child($messageID).child('sUser').val() == auth.uid) || !root.child('messages').child('chats').child($messageID).exists() || (!root.child('messages').child('chats').child($messageID).child('fUser').exists() && !root.child('messages').child('chats').child($messageID).child('sUser').exists())"
             }
          },
          "users": {
            "$uid": {
          		".indexOn": ["userID", "active", "new", "timestamp"]
        		}
          }
        },
        ".read": true,
        ".write": true
      }
    }
    

Step 4: Enable Email in Firebase Authentication

  1. Click on Authentication
  2. Navigate to Sign-in Method 
  3. Enable Email option

Step 4: Uploading Google Private Key File to your website

  1. Click on Project Overview -> Select Users and Permissions
  2. Click on Manage their permissions link
  3. Click on Service accounts -> Create Key
  4. Select JSON format -> Download it
  5. Log into your website
  6. Click on Wiloke Tools -> Notification Settings -> Upload the downloaded file

Step 4: Firebase Message Configuration

  1. Click on Project Settings
  2. Click on Add Firebase to your web app
  3. A window popup will appear, it contains your Firebase Information. Log into your site -> Wiloke Tools -> Notification Settings -> Firebase Configuration -> Using the information in the Firebase Popup to complete all settings here.
Please follow and like us:

Leave A Comment?