title: How to update phone number on Firebase Authentication in NodeJS?
body: <p>I have implemented Firebase phone authentication to verify the phone number in my project, But my problem is how to update the mobile number on auth. Like if a user had logged in with phone number A and this user lost his phone number, so the user needs to update the phone number A to B. it would be possible to replace the phone number from authentication or any other way around?</p>
  
  <p>this is what i did..based on the answer below.</p>
  
  <pre><code>router.post('/replacenumber', function (req, res) {
      var user_id = 'y7BpNKRdGasd12lIYOsUsg13QZRx1'; //this is the uid of the user
      var phone = '+639507382841'; //this is the 2nd mobile number
      admin.auth().updateUser(user_id, {
                phoneNumber: phone,
      }).then(function(userRecord) {
         // See the UserRecord reference doc for the contents of userRecord.
         console.log(userRecord.toJSON());
         //console.log("Successfully updated user", userRecord.toJSON());
         //callback(userRecord.toJSON());
         console.log(user_id);
      }).catch(function(error) {
         var errorMessage = error.message;
            //console.log("Error updating user:", error);
         console.log(null, errorMessage);
      });
  })
  </code></pre>