Hello,
I googled thoroughly but there is hundred examples from ASP.NET but nothing about ASP.NET Core.
In order to getting password reset work I need to registe
I'm not sure if it's workaround or normal approach, but the IUserTwoFactorTokenProvider
interface seems to be a right way. IUserTokenProvider appears to no longer exists.
Figured out that I have to register the provider manually in the identity:
services.AddIdentity(options =>
{
...
options.Tokens.ProviderMap.Add("Default", new TokenProviderDescriptor(typeof(IUserTwoFactorTokenProvider)));
})
And the optional configuration in ConfigureServices
:
services.Configure(o =>
{
o.Name = "Default";
o.TokenLifespan = TimeSpan.FromHours(1);
});
And the password reset / email validation tokens are working now.
PS: Opened an issue for clarification