Getting Started With ASP.NET Core 2.0 Identity And Role Management

In this article, we will see in detail how to use ASP.NET Core Identity in MVC Application for creating user roles and displaying the menu depending on user roles.

C# (2.1 MB)
5 Star
1,346 times
Add to favorites
E-mail Twitter Digg Facebook

Solution explorer

    ViewData["Title"] = "Disable two-factor authentication (2FA)";


<div class="alert alert-warning" role="alert">
        <span class="glyphicon glyphicon-warning-sign"></span>
        <strong>This action only disables 2FA.</strong>
        Disabling 2FA does not change the keys used in authenticator apps. If you wish to change the key
        used in an authenticator app you should <a asp-action="ResetAuthenticatorWarning">reset your
        authenticator keys.</a>

    <form asp-action="Disable2fa" method="post" class="form-group">
        <button class="btn btn-danger" type="submit">Disable 2FA</button>