0
I’m trying to perform a password reset system on my React Native project with Firebase but it doesn’t work at all.
The state of the email is displayed as normal in Alert, but the password returns Undefined.
update = async() => {
const password = this.state;
if(password != ""){
auth().onAuthStateChanged(function(user) {
if (user) {
user.updatePassword(password.toString()).then(function() {
Alert.alert(`${user.email} - ${user.password}`);
}).catch(function(error) {
Alert.alert(error);
});
} else {
//Alert.alert("deslogado");
}
});
}
else{
this.setState({error: "Campo Vazio!"});
}
}