I\'m trying to implement password reset functionality with nightly build of ASP.NET Identity 1.1. There is a UserManager.GetPasswordResetToken method, but it throws an exception
The default token provider implementation is found in the Microsoft.Identity.Owin
package:
///
/// Token provider that uses a DataProtector to generate encrypted tokens
///
public class DataProtectorTokenProvider : ITokenProvider {
public DataProtectorTokenProvider(IDataProtector protector)
And you do something like this to wire one up using the default data protection provider from your OWIN IAppBuilder
IDataProtectionProvider provider = app.GetDataProtectionProvider();
if (provider != null)
{
manager.PasswordResetTokens = new DataProtectorTokenProvider(provider.Create("PasswordReset"));
manager.UserConfirmationTokens = new DataProtectorTokenProvider(provider.Create("ConfirmUser"));
}