Activities of "maliming"

hi

You can fix the test with the following code. I will also fix it in the next 9.3 patch version.

Thanks.

hi

Can you share the full Response Headers?


Or you just share a template project, and I will check it locally.

liming.ma@volosoft.com

Thanks

Great

Answer

hi

Once you can reproduce the problem locally, feel free to share it, I will fix it immediately

Thanks.

hi

The FAQ page will be available in ABP 10.0.

You can now use an MVC page to manage it.

Thanks.

hi

The logs level still [INF] instad of [DBG]

See

ok.

Answer

hi

Remote debug will be hard.

Can you test your case in a new template project?

Thanks.

You can try the latest version:

Add a 2FA.cshtml in your Pages folder. Also, make it an embedded file.

Send an email to liming.ma@volosoft.com. I will share the 2FA.cshtml content.

  <ItemGroup>
    <Content Remove="Pages\2FA.cshtml" />
    <EmbeddedResource Include="Pages\2FA.cshtml" />
  </ItemGroup>
public override void ConfigureServices(ServiceConfigurationContext context)
{
    Configure<ProfileManagementPageOptions>(options =>
    {
        options.Contributors.RemoveAll(x => x is AccountProfileManagementPageContributor);
        options.Contributors.Add(new MyAccountProfileManagementPageContributor());
    });
}
```cs System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Volo.Abp.Account;
using Volo.Abp.Account.Localization;
using Volo.Abp.Account.Public.Web.Pages.Account.Components.ProfileManagementGroup.TwoFactor;
using Volo.Abp.Account.Public.Web.ProfileManagement;
using Volo.Abp.Caching;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Identity;
using Volo.Abp.Identity.Settings;
using Volo.Abp.Security.Claims;
using Volo.Abp.Settings;
using Volo.Abp.Threading;
using IdentityUser = Volo.Abp.Identity.IdentityUser;

namespace MyCompanyName.MyProjectName.Web;

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(AccountProfileTwoFactorManagementGroupViewComponent))]
public class MyAccountProfileTwoFactorManagementGroupViewComponent : AccountProfileTwoFactorManagementGroupViewComponent
{
    public MyAccountProfileTwoFactorManagementGroupViewComponent(
        IProfileAppService profileAppService,
        IAccountAppService accountAppService,
        IdentityProTwoFactorManager identityProTwoFactorManager)
        : base(profileAppService, accountAppService, identityProTwoFactorManager)
    {
    }

    public override async Task&lt;IViewComponentResult&gt; InvokeAsync()
    {
        var authenticatorInfo = await AccountAppService.GetAuthenticatorInfoAsync();
        var model = new ChangeTwoFactorModel
        {
            TwoFactorForcedEnabled = await IdentityProTwoFactorManager.IsForcedEnableAsync(),
            TwoFactorEnabled = await ProfileAppService.GetTwoFactorEnabledAsync(),
            HasAuthenticator = await AccountAppService.HasAuthenticatorAsync(),
            SharedKey = authenticatorInfo.Key,
            AuthenticatorUri = authenticatorInfo.Uri
        };

        return View("~/Pages/2FA.cshtml", model);
    }
}

public class MyAccountProfileManagementPageContributor : IProfileManagementPageContributor
{
    public async Task ConfigureAsync(ProfileManagementPageCreationContext context)
    {
        await new AccountProfileManagementPageContributor().ConfigureAsync(context);

        var identityTwoFactorManager = context.ServiceProvider.GetRequiredService&lt;IdentityProTwoFactorManager&gt;();
        var settingProvider = context.ServiceProvider.GetRequiredService&lt;ISettingProvider&gt;();
        if (!await identityTwoFactorManager.IsForcedDisableAsync() &&
            await settingProvider.GetAsync&lt;bool&gt;(IdentityProSettingNames.TwoFactor.UsersCanChange))
        {
            var l = context.ServiceProvider.GetRequiredService&lt;IStringLocalizer&lt;AccountResource&gt;>();

            context.Groups.Add(
                new ProfileManagementPageGroup(
                    "Volo-Abp-Account-TwoFactor",
                    l["ProfileTab:TwoFactor"],
                    typeof(AccountProfileTwoFactorManagementGroupViewComponent)
                )
            );
        }
    }
}

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IdentityUserManager))]
public class MyIdentityUserManager : IdentityUserManager
{
    public MyIdentityUserManager(IdentityUserStore store,
        IIdentityRoleRepository roleRepository,
        IIdentityUserRepository userRepository,
        IOptions&lt;IdentityOptions&gt; optionsAccessor,
        IPasswordHasher&lt;IdentityUser&gt; passwordHasher,
        IEnumerable&lt;IUserValidator&lt;IdentityUser&gt;> userValidators,
        IEnumerable&lt;IPasswordValidator&lt;IdentityUser&gt;> passwordValidators,
        ILookupNormalizer keyNormalizer,
        IdentityErrorDescriber errors,
        IServiceProvider services,
        ILogger&lt;IdentityUserManager&gt; logger,
        ICancellationTokenProvider cancellationTokenProvider,
        IOrganizationUnitRepository organizationUnitRepository,
        ISettingProvider settingProvider,
        IDistributedEventBus distributedEventBus,
        IIdentityLinkUserRepository identityLinkUserRepository,
        IDistributedCache&lt;AbpDynamicClaimCacheItem&gt; dynamicClaimCache)
        : base(store, roleRepository, userRepository, optionsAccessor, passwordHasher, userValidators,
            passwordValidators, keyNormalizer, errors, services, logger, cancellationTokenProvider,
            organizationUnitRepository, settingProvider, distributedEventBus, identityLinkUserRepository,
            dynamicClaimCache)
    {
    }

    public override async Task&lt;IList&lt;string&gt;> GetValidTwoFactorProvidersAsync(IdentityUser user)
    {
        var providers = await base.GetValidTwoFactorProvidersAsync(user);
        providers.RemoveAll(x => x == TokenOptions.DefaultEmailProvider || x == TokenOptions.DefaultPhoneProvider);
        return providers;
    }
}

Can you add a breakpoint to see the values of return providers?

Showing 91 to 100 of 10683 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 16, 2025, 10:35