No IUserTwoFactorTokenProvider<TUser> named 'Default' is registered.'

C#
// startup.cs
public void ConfigureServices(IServiceCollection services)
{
  // ....
  services.AddIdentityCore<User, UserRole>()
    .AddEntityFrameworkStores<ApplicationDbContext>()
    .AddDefaultTokenProviders(); // Remember to add this line!
  // ....
}
Source

Also in C#: