title: Identity password reset token is invalid
body: <p>I'm writting MVC 5 and using Identity 2.0. </p>
  
  <p>Now I m trying to reset password. But i always getting "invalid token" error for reset password token. </p>
  
  <pre><code>    public class AccountController : Controller
  {
      public UserManager&lt;ApplicationUser&gt; UserManager { get; private set; }
  
      public AccountController()
          : this(new UserManager&lt;ApplicationUser&gt;(new UserStore&lt;ApplicationUser&gt;(new ApplicationDbContext())))
      {
      }
  </code></pre>
  
  <p>and i set DataProtectorTokenProvider,</p>
  
  <pre><code>        public AccountController(UserManager&lt;ApplicationUser&gt; userManager)
      {   
          //usermanager config
          userManager.PasswordValidator = new PasswordValidator { RequiredLength = 5 };  
          userManager.EmailService = new IddaaWebSite.Controllers.MemberShip.MemberShipComponents.EmailService(); 
  
          var provider = new Microsoft.Owin.Security.DataProtection.DpapiDataProtectionProvider();
          userManager.UserTokenProvider = new Microsoft.AspNet.Identity.Owin.DataProtectorTokenProvider&lt;ApplicationUser&gt;(provider.Create("UserToken"))
                                                      as IUserTokenProvider&lt;ApplicationUser, string&gt;;
  
  
  
  
          UserManager = userManager;
  
      }
  </code></pre>
  
  <p>i generate password reset before sending mail</p>
  
  <pre><code> [HttpPost]
      [ValidateAntiForgeryToken]
      public async Task&lt;ActionResult&gt; ManagePassword(ManageUserViewModel model)
      {
          if (Request.Form["email"] != null)
          {
            var email = Request.Form["email"].ToString();
            var user = UserManager.FindByEmail(email);
            var token = await UserManager.GeneratePasswordResetTokenAsync(user.Id);
             //mail send
          }
     }
  </code></pre>
  
  <p>i click link in mail and i'm getting passwordreset token and using  </p>
  
  <pre><code>var result = await UserManager.ResetPasswordAsync(model.UserId, model.PasswordToken, model.NewPassword);
  </code></pre>
  
  <p>the result always false and it says "Invalid Token".
  Where should i fix ?</p>