I'm using the ASP default identity (.Net 9.0).
Everything works fine except that when a user, once logged in, click on the its logged email account (manage account), an option is dispalyed "Two-factor authentication". I don't use this functionnality. I just want to hide it. Is there a way to hide it by configuration in the program.cs? Something like builder.Services.AddDefaultIdentity(options => options.TwoFactorAuthentification = false). Do I have to scaffold all the pages and hide it myself or there's an option to hide generically?
I've look in the builder.Services.AddDefaultIdentity option but i couldn't find any option to hide the "Two-factor authentication" option.
I'm using the ASP default identity (.Net 9.0).
Everything works fine except that when a user, once logged in, click on the its logged email account (manage account), an option is dispalyed "Two-factor authentication". I don't use this functionnality. I just want to hide it. Is there a way to hide it by configuration in the program.cs? Something like builder.Services.AddDefaultIdentity(options => options.TwoFactorAuthentification = false). Do I have to scaffold all the pages and hide it myself or there's an option to hide generically?
I've look in the builder.Services.AddDefaultIdentity option but i couldn't find any option to hide the "Two-factor authentication" option.
Share Improve this question asked Mar 17 at 21:47 BourrelleBourrelle 11 Answer
Reset to default 0I found the solution. I needed to scaffold the page with:
dotnet aspnet-codegenerator identity --files "Account.Manage._ManageNav"
Then i commented the sections i didnt want.