0

I tried to make email verification and the problem is that the app registered the user without sending the email

this is my Function code

Future<String> registerUsingEmailAndPassword(String email, String password) async {
    UserCredential userCredential = await firebaseAuth.createUserWithEmailAndPassword(email: email, password: password);
    User user = userCredential.user;
    if(!user.emailVerified){
      await user.sendEmailVerification();
      print(user.email);
    }
    return user.uid;
  }

and this is my log

W/System  ( 3599): Ignoring header X-Firebase-Locale because its value was null.
W/System  ( 3599): Ignoring header X-Firebase-Locale because its value was null.
D/FirebaseAuth( 3599): Notifying id token listeners about user ( Q8d7R7mE9dOv5lAbkZH2UCiwmKA2 ).
D/FirebaseAuth( 3599): Notifying auth state listeners about user ( Q8d7R7mE9dOv5lAbkZH2UCiwmKA2 ).
W/System  ( 3599): Ignoring header X-Firebase-Locale because its value was null.
I/flutter ( 3599): wasee.2132254@gmail.com

EDIT

when I check my email I found the messages, so, wanna do something like waiting screen that waiting for the user verification and then resumes the registration process

any idea?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Was Ash
  • 33
  • 1
  • 9

1 Answers1

0

I think you could check if Firebase User user.isEmailVerified is true