最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How can I hide the two factore authentification option in the Identity account - Stack Overflow

programmeradmin3浏览0评论

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 1
Add a comment  | 

1 Answer 1

Reset to default 0

I 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.

发布评论

评论列表(0)

  1. 暂无评论