private void Changepassword(string newpassword) { FirebaseUser user = auth.CurrentUser; user.UpdatePassword(newpassword) .AddOnCompleteListener(this); }
//create a method that change the password private void ChangePassword(string newPassword) { try { // create a funtion that the user must re enter the password if (input_new_password.Text == reinput_new_password.Text) { //create a funtion that change password FirebaseUser user = auth.CurrentUser; user.UpdatePassword(newPassword) .AddOnCompleteListener(this, this); //user.Reauthenticate StartActivity(new Intent(this, typeof(MainActivity))); //create a toast when the user logout Toast.MakeText(this, "Successfully change", ToastLength.Short).Show(); //closing the current form Finish(); } else { //creeate a funtion that catch is the password is not match Toast.MakeText(this, "Password do not match", ToastLength.Short).Show(); } } catch (Exception e) { //creeate a exception if the email is exsisting or empty Toast.MakeText(this, " Failed", ToastLength.Short).Show(); } }
/// <summary> /// Notifies firebase to change the password /// </summary> /// <param name="newPassword">New password</param> private void ChangePassword(string newPassword) { FirebaseUser user = AuthHelper.GetInstance(this).GetAuth().CurrentUser; user.UpdatePassword(newPassword) .AddOnCompleteListener(this); }
private void changePassword(string newPassword) { FirebaseUser user = auth.CurrentUser; //using the update method user.UpdatePassword(newPassword) .AddOnCompleteListener(this); }
//edit so it edits the password on user database //might have to move to other page (edit page) //Change password of user private void ChangePassword(string newpwd) { FirebaseUser user = auth.CurrentUser; user.UpdatePassword(newpwd) .AddOnCompleteListener(this); //Change password on Realtime database UpdatetoRealtime(user.Email, newpwd); }
public void ChangePass(string newpass, IOnCompleteListener c) { FirebaseUser user = FirebaseAuth.Instance.CurrentUser; user.UpdatePassword(newpass).AddOnCompleteListener(c); }