I am trying to verify the email by firebase but the problem is that no email is sent to the user. Please Help
this is my code:
private void userLogin() {
progressBar.setVisibility(View.VISIBLE);
mAuth.signInWithEmailAndPassword(emailString, passwordString)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
if (user.isEmailVerified()) {
progressBar.setVisibility(View.GONE);
Intent intent = new Intent(LoginActivity.this, MainActivity.class);
startActivity(intent);
finish();
} else {
user.sendEmailVerification();
Toast.makeText(LoginActivity.this, "Please verified your email address!", Toast.LENGTH_LONG).show();
}
} else {
progressBar.setVisibility(View.GONE);
Toast.makeText(LoginActivity.this, "Failed to login! Please check your credentials.", Toast.LENGTH_LONG).show();
}
}
});
}