public async Task <IActionResult> ResetPassword(ResetPasswordModela resetPasswordModel)
        {
            if (!string.Equals(resetPasswordModel.Password, resetPasswordModel.ConfirmPassword, StringComparison.InvariantCulture))
            {
                ModelState.AddModelError(string.Empty, "Passwords does not match");
            }

            if (!ModelState.IsValid)
            {
                return(View(resetPasswordModel));
            }
            var user = await _userManager.FindByEmailAsync(resetPasswordModel.Email);

            if (user == null)
            {
                RedirectToAction(nameof(ResetPasswordConfirmation));
            }
            var resetPassResult = await _userManager.ResetPasswordAsync(user, resetPasswordModel.Token, resetPasswordModel.Password);

            if (!resetPassResult.Succeeded)
            {
                AddErrorsToModelState(resetPassResult.Errors);

                return(View());
            }

            return(RedirectToAction(nameof(ResetPasswordConfirmation)));
        }
        public IActionResult ResetPassword(string token, string email)
        {
            var model = new ResetPasswordModela {
                Token = token, Email = email
            };

            return(View(model));
        }