Firebase Authentication for email credentials is one of the most simple and powerful onboarding features. To be able to make use of this facility, we need to enable the Email provider in the Firebase console. Using the Android Studio Firebase window, we can set up Firebase Authentication. Alternatively, we can add the configuration google-play-services.json file and dependencies manually. In your application level Gradle file, add the following dependency:
compile 'com.google.firebase:firebase-auth:11.8.0'
We need to declare an instance of the FirebaseAuth class, using which we can later get an access to the Firebase AuthResult object:
private FirebaseAuth mAuth;
We need to initialize the FirebaseAuth reference in the onCreate method, as shown here:
mAuth = FirebaseAuth.getInstance();