Updating and Deleting Data in Firebase


Updating Data in Firebase
To update data, you can use the same setValue() method by passing new value. You can also use updateChildren() by passing the path to update data without disturbing other child nodes data. For example, if you want to update only the user email, you can use below code block:

 String newEmail = 'poke@gmail.com';
 mDatabase.child( userId ).child( "email" ).setValue( newEmail );

Deleting Data from Firebase
The simplest way to delete data is to call removeValue() on a reference to the location of that data. You can also delete by specifying null as the value for another write operation such as setValue() or updateChildren(). You can use this technique with updateChildren() to delete multiple children in a single API call.

Firebase Authentication
Firebase Authentication provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app. It supports authentication using passwords, phone numbers, popular federated identity providers like Google, Facebook and Twitter, and more. Firebase Authentication integrates tightly with other Firebase services, and it leverages industry standards like OAuth 2.0 and OpenID Connect, so it can be easily integrated with your custom backend. There are two modes when creating a Firebase project:


      “How can I be substantial if I do not cast a shadow?    
      I must have a dark side also if I am to be whole.”    
      ― C.G. Jung, Modern Man in Search of a Soul