Usermanager generate email confirmation token sometimes returns null
Alex
0
Reputation points
Why is it that sometimes the _userManager.GenerateEmailConfirmationTokenAsync(user);
returns null. It's very rare to happen but it is happening and I need to know the reason behind it.
This is my current configuration for Identity
builder.Services.AddIdentity<ApplicationUser, ApplicationRole>(options =>
{
options.SignIn.RequireConfirmedAccount = true;
options.Password.RequireDigit = false;
options.Password.RequireNonAlphanumeric = false;
options.Password.RequireUppercase = false;
options.Password.RequiredLength = 8;
options.Password.RequiredUniqueChars = 0;
})
.AddErrorDescriber<LocalizedIdentityErrorDescriber>() // Add the localization for identity validation messages
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
Sign in to answer