var user = firebase.auth().currentUser; if (user.password == state.password) { user.updatePassword(state.password).then(function() { // Update successful. }).catch(function(error) { // An error happened. }); }