And there is another problem, when I override and enable 2FA tab in /Accounts/Manage Page manually with:
"
Configure<ProfileManagementPageOptions>(options =>
{
options.Contributors.RemoveAll(x => x.GetType() == typeof(AccountProfileManagementPageContributor));
options.Contributors.Add(new MyAccountProfileManagementPageContributor());
});
", the tab is duplicated, i.e there are two 2FA tabs, here is the screenshot:
Ok I'll try this out
Yes but the user has to login in first, user cannot login because the providers list is empty. It is requiring it because email is set to verified
No, it still shows empty dropdown of providers
Or I can set all the user's emails to verified by default and remove the email and phone from GetValidTwoFactorProvidersAsync(), but then if the user hasn't enabled TOTP it shows empty list of providers.
Or there is other way of solving this problem, I can override the /Account/Manage page model and make it so it displays 2FA page there without verifying email or phone but the Force behavior is still tied to email or phone being verified. Can you help me with making so the Force behavior works with TOTP as well (when the email and phone are not verified). I mean so it redirects the user to 2FA page if 2FA behavior is set to force and the user hasn't enabled TOTP yet?
User cannot enable 2FA in /Account/Manage page if the email is not verified, i.e TOTP is totally dependent on email and phone providers, which I am trying to change and also Force behavior doesn't work without email or phone. And also I tried the code above it still shows Two Factor Authentication page (which comes after login) with an empty list of providers