packages/auth/demo/public/script.js
function onUpdateConfirmPhoneVerification() {
  if (!activeUser()) {
    alertError('You need to sign in before linking an account.');
    return;
  }
  var verificationId = $('#link-reauth-phone-verification-id').val();
  var verificationCode = $('#link-reauth-phone-verification-code').val();
  var credential = firebase.auth.PhoneAuthProvider.credential(
      verificationId, verificationCode);
  activeUser().updatePhoneNumber(credential).then(function() {
    refreshUserData();
    alertSuccess('Phone number updated!');
  }, onAuthError);
}
function onUpdateConfirmPhoneVerification() {
  if (!activeUser()) {
    alertError('You need to sign in before linking an account.');
    return;
  }
  var verificationId = $('#link-reauth-phone-verification-id').val();
  var verificationCode = $('#link-reauth-phone-verification-code').val();
  var credential = firebase.auth.PhoneAuthProvider.credential(
      verificationId, verificationCode);
  activeUser().updatePhoneNumber(credential).then(function() {
    refreshUserData();
    alertSuccess('Phone number updated!');
  }, onAuthError);
}
function onUpdateConfirmPhoneVerification ( ) { if ( ! activeUser ( ) ) { alertError ( 'You need to sign in before linking an account.' ) ; return ; } var verificationId = $ ( '#link-reauth-phone-verification-id' ) . val ( ) ; var verificationCode = $ ( '#link-reauth-phone-verification-code' ) . val ( ) ; var credential = firebase . auth . PhoneAuthProvider . credential ( verificationId , verificationCode ) ; activeUser ( ) . updatePhoneNumber ( credential ) . then ( function ( ) { refreshUserData ( ) ; alertSuccess ( 'Phone number updated!' ) ; } , onAuthError ) ; }
Updates the user's phone number.
Updates the user s phone number .