public async Task <ActionResult> ResetPasswordCallback(UserResetPasswordCallbackViewModel model)
        {
            if (Request.IsAuthenticated)
            {
                return(GetDefaultRedirectRoute());
            }

            if (ModelState.IsValid)
            {
                string userEmail = model.Email;

                var user = await _userManager.FindByEmailAsync(userEmail);

                if (user != null)
                {
                    var result = await _userManager.ResetPasswordAsync(user.Id, model.ResetToken, model.Password);

                    if (result.Succeeded)
                    {
                        await _signInManager.PasswordSignInAsync(userEmail, model.Password, true, shouldLockout : false);

                        return(RedirectToLocal());
                    }

                    AddErrors(result);
                }
                else
                {
                    ModelState.AddModelError(string.Empty, UserResources.ResetPasswordGeneralErrorMessage);
                }
            }

            return(View(model));
        }
        public ActionResult ResetPasswordCallback(string resetToken)
        {
            if (Request.IsAuthenticated)
            {
                return(GetDefaultRedirectRoute());
            }

            if (resetToken == null)
            {
                return(ErrorResult(HttpStatusCode.BadRequest));
            }

            var model = new UserResetPasswordCallbackViewModel()
            {
                ResetToken = resetToken
            };

            return(View(model));
        }