Reputation: 31
I used Firebase authentication
in my android app. But in registration if I entered [email protected]
it accept it successfully and also login the user successfully. But [email protected]
in not real id. What is the way to check email id entered is really exist . e.g. [email protected]
. This is my id provided by gmail. Please suggest
Upvotes: 3
Views: 376
Reputation: 80914
To verify the email address using firebase, you can use the method sendEmailVerification()
:
FirebaseAuth auth = FirebaseAuth.getInstance();
FirebaseUser user = auth.getCurrentUser();
user.sendEmailVerification()
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()) {
Log.d(TAG, "Email sent.");
}
}
});
more info here:
https://firebase.google.com/docs/auth/android/manage-users#send_a_user_a_verification_email
Upvotes: 4