Configure tolken provider

This commit is contained in:
2016-09-23 21:23:33 -04:00
parent 0b5dde065a
commit f473c64540
4 changed files with 19 additions and 8 deletions
@@ -8,8 +8,6 @@ using InventoryTraker.Web.Core;
using InventoryTraker.Web.Identity;
using InventoryTraker.Web.Models;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin.Security.DataProtection;
namespace InventoryTraker.Web.Controllers
{
@@ -74,9 +72,6 @@ namespace InventoryTraker.Web.Controllers
if (!string.IsNullOrEmpty(form.Password))
{
var provider = new DpapiDataProtectionProvider("Inventory Traker");
_userManager.UserTokenProvider = new DataProtectorTokenProvider<User>(
provider.Create("EmailConfirmation"));
var resetToken = await _userManager.GeneratePasswordResetTokenAsync(user.Id);
var resetResult = await _userManager.ResetPasswordAsync(user.Id, resetToken, form.Password);
if (!resetResult.Succeeded)