Ejemplo n.º 1
0
        private void Changepassword(string newpassword)
        {
            FirebaseUser user = auth.CurrentUser;

            user.UpdatePassword(newpassword)
            .AddOnCompleteListener(this);
        }
Ejemplo n.º 2
0
        //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();
            }
        }
Ejemplo n.º 3
0
        /// <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);
        }
Ejemplo n.º 4
0
        private void changePassword(string newPassword)
        {
            FirebaseUser user = auth.CurrentUser;

            //using the update method

            user.UpdatePassword(newPassword)
            .AddOnCompleteListener(this);
        }
Ejemplo n.º 5
0
        //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);
        }
Ejemplo n.º 6
0
        public void ChangePass(string newpass, IOnCompleteListener c)
        {
            FirebaseUser user = FirebaseAuth.Instance.CurrentUser;

            user.UpdatePassword(newpass).AddOnCompleteListener(c);
        }