Open Closed

HOW TO remove Two factor item #1690


User avatar
0
zhangxd1222 created

I want to remove Two facotr item, so what can i do, thanks


2 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Firstly you have to create your profile menu contributor like below:

    public class CustomProfileMenuContributor : IProfileManagementPageContributor
    {
        public Task ConfigureAsync(ProfileManagementPageCreationContext context)
        {
            context.Groups.ForEach(Console.WriteLine);
    
            context.Groups.Remove(context.Groups.First(x => x.Id == "Volo-Abp-Account-TwoFactor"));
    
            return Task.CompletedTask;
        }
    }
    

    Then go to WebModule class and add your contributor via configuring ProfileManagementPageOptions

    Configure<ProfileManagementPageOptions>(p =>
    {
        p.Contributors.Add(new CustomProfileMenuContributor());
    });
    

    You'll see Two Factor is removed:

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 16, 2025, 12:13