Firebase isEmailVerified returns false even after checking email

I send a confirmation email and click on the link. Then I call isEmailVerified() on the FirebaseUser object. This always returns null , what could be the reason?

+6
source share
2 answers

You must update the user object after validation as follows:

 usertask = mAuth.getCurrentUser().reload(); usertask.addOnSuccessListener(new OnSuccessListener() { @override public void onSuccess(Void aVoid) { user = mAuth.getCurrentUser(); boolean useremailveri = user.isEmailVerified(); String useremailuid = user.getUid(); } }); 
+4
source

I think you need to first log in using the user’s email and password using the signInWithEmailAndPassword , then try calling the isEmailVerified() method when you return the user.

0
source

Source: https://habr.com/ru/post/1012389/


All Articles