Configure tolken provider
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user