Reputation: 147
I am at https://firebase.google.com/docs/auth/android/start/ and I see this code snippets:
private FirebaseAuth mAuth;
mAuth = FirebaseAuth.getInstance();
mAuth.createUserWithEmailAndPassword(email, password)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
// Sign in success, update UI with the signed-in user's information
Log.d(TAG, "createUserWithEmail:success");
FirebaseUser user = mAuth.getCurrentUser();
updateUI(user);
} else {
// If sign in fails, display a message to the user.
Log.w(TAG, "createUserWithEmail:failure", task.getException());
Toast.makeText(EmailPasswordActivity.this, "Authentication failed.",
Toast.LENGTH_SHORT).show();
updateUI(null);
}
// ...
}
});
I believe that the "FirebaseAuth" class is not part of the FirebaseUI library. I believe it is a part of the firebase SDK.
So I go to the reference for the firebase SDK (https://firebase.google.com/docs/reference/android/com/google/firebase/package-summary). But I cannot find this class anywhere, or the method .createUserWithEmailAndPassword(email, password).
Can someone point me to the documentation for FirebaseAuth? I guess the answer I am looking for would be a URL, along with a conceptual explanation of how this code is organized.
Upvotes: 0
Views: 160
Reputation: 400
Here you go: https://developers.google.com/android/reference/com/google/firebase/auth/FirebaseAuth
I don't see where else you would rather find this.
Upvotes: 2