● Get FCM Key used to push notification into different types of Web Application, Mobile Application.
● Update the Firebase RealTime Database Rules.
{
"rules": {
".read": "true",
".write": "true"
}
}
{
"rules": {
"live": {
"live_tracking": {
".read": "auth.uid != null",
".write": "auth.uid != null",
"$trip_id": {
// UID must match logged in user and is fixed once set
"uid": {
".validate": "(data.exists() && data.val() == newData.val()) || newData.val() == auth.uid"
},
}
},
"Notification": {
".read": "auth.uid != null",
".write": "auth.uid != null",
"$user_id": {
"uid": {
".validate": "(data.exists() && data.val() == newData.val()) || newData.val() == auth.uid"
},
}
},
"driver_rider_trip_chats": {
".read": "auth.uid != null",
".write": "auth.uid != null",
"$trip_id": {
"uid": {
".validate": "(data.exists() && data.val() == newData.val()) || newData.val() == auth.uid"
},
}
},
"trip": {
".read": "auth.uid != null",
".write": "auth.uid != null",
"$trip_id": {
"uid": {
".validate": "(data.exists() && data.val() == newData.val()) || newData.val() == auth.uid"
},
}
},
"trip_request": {
".read": "auth.uid != null",
".write": "auth.uid != null",
"$trip_id": {
"uid": {
".validate": "(data.exists() && data.val() == newData.val()) || newData.val() == auth.uid"
},
}
},
"GeoFire": {
".read": "auth.uid != null",
".write": "auth.uid != null",
".indexOn": "g",
"$trip_id": {
"uid": {
".validate": "(data.exists() && data.val() == newData.val()) || newData.val() == auth.uid"
},
}
}
},
"demo": {
"live_tracking": {
".read": "auth.uid != null",
".write": "auth.uid != null",
"$trip_id": {
"uid": {
".validate": "(data.exists() && data.val() == newData.val()) || newData.val() == auth.uid"
},
}
},
"Notification": {
".read": "auth.uid != null",
".write": "auth.uid != null",
"$user_id": {
"uid": {
".validate": "(data.exists() && data.val() == newData.val()) || newData.val() == auth.uid"
},
}
},
"driver_rider_trip_chats": {
".read": "auth.uid != null",
".write": "auth.uid != null",
"$trip_id": {
"uid": {
".validate": "(data.exists() && data.val() == newData.val()) || newData.val() == auth.uid"
},
}
},
"trip": {
".read": "auth.uid != null",
".write": "auth.uid != null",
"$trip_id": {
"uid": {
".validate": "(data.exists() && data.val() == newData.val()) || newData.val() == auth.uid"
},
}
},
"trip_request": {
".read": "auth.uid != null",
".write": "auth.uid != null",
"$trip_id": {
"uid": {
".validate": "(data.exists() && data.val() == newData.val()) || newData.val() == auth.uid"
},
}
},
"GeoFire": {
".read": "auth.uid != null",
".write": "auth.uid != null",
".indexOn": "g",
"$trip_id": {
"uid": {
".validate": "(data.exists() && data.val() == newData.val()) || newData.val() == auth.uid"
},
}
}
}
}
}