0
votes

I'am using Fireabse auth with react js and firebase SDK.

So I'm able to register / login and send a verification link after login, but I need to send the verification email after sign up, the createUserWithEmailAndPassword() method return a user object (not like the old sdk version you can use that user result to send email).

firebase.auth().createUserWithEmailAndPassword(email, password).then((user) => {
console.log(user.uid)
}

Any help please ?

Thanks

1

1 Answers

0
votes

Your user in the callback is a UserCredential object. You can get a User object with user.user, and you can use that object to send the email with user.user.sendEmailVerification().