2017-09-13 15:47:34 +09:00
@model TwoFactorAuthenticationViewModel
@{
2018-04-19 15:57:23 -05:00
ViewData.SetActivePageAndTitle(ManageNavPages.TwoFactorAuthentication, "Two-factor authentication");
2017-09-13 15:47:34 +09:00
}
2017-10-27 17:53:04 +09:00
@if(Model.Is2faEnabled)
2017-09-13 15:47:34 +09:00
{
2017-10-27 17:53:04 +09:00
if(Model.RecoveryCodesLeft == 0)
2017-09-13 15:47:34 +09:00
{
<div class="alert alert-danger">
2020-07-08 19:19:29 +02:00
<h4 class="alert-heading mb-3">
<span class="fa fa-warning"></span>
You have no recovery codes left.
</h4>
<p class="mb-0">You must <a asp-action="GenerateRecoveryCodes" class="alert-link">generate a new set of recovery codes</a> before you can log in with a recovery code.</p>
2017-09-13 15:47:34 +09:00
</div>
}
2017-10-27 17:53:04 +09:00
else if(Model.RecoveryCodesLeft == 1)
2017-09-13 15:47:34 +09:00
{
<div class="alert alert-danger">
2020-07-08 19:19:29 +02:00
<h4 class="alert-heading mb-3">
<span class="fa fa-warning"></span>
2020-07-13 08:13:27 +02:00
You only have 1 recovery code left.
2020-07-08 19:19:29 +02:00
</h4>
<p class="mb-0">You can <a asp-action="GenerateRecoveryCodes" class="alert-link">generate a new set of recovery codes</a>.</p>
2017-09-13 15:47:34 +09:00
</div>
}
2017-10-27 17:53:04 +09:00
else if(Model.RecoveryCodesLeft <= 3)
2017-09-13 15:47:34 +09:00
{
<div class="alert alert-warning">
2020-07-08 19:19:29 +02:00
<h4 class="alert-heading mb-3">
<span class="fa fa-warning"></span>
2020-07-13 08:13:27 +02:00
You only have @Model.RecoveryCodesLeft recovery codes left.
2020-07-08 19:19:29 +02:00
</h4>
<p class="mb-0">You should <a asp-action="GenerateRecoveryCodes" class="alert-link">generate a new set of recovery codes</a>.</p>
2017-09-13 15:47:34 +09:00
</div>
}
}
2020-07-14 13:29:26 +02:00
<div class="list-group">
@if (Model.Is2faEnabled)
{
<a asp-action="Disable2faWarning" class="list-group-item d-flex justify-content-between align-items-center list-group-item-action py-3">
<div>
<h5 >Disable 2FA</h5>
2021-05-19 04:39:27 +02:00
<p class="mb-0 me-3">Disable two-factor authentication. Re-enabling will not require you to reconfigure your Authenticator app. </p>
2020-07-14 13:29:26 +02:00
</div>
<i class="fa fa-chevron-right"></i>
</a>
<a asp-action="GenerateRecoveryCodes" class="list-group-item d-flex justify-content-between align-items-center list-group-item-action py-3">
<div>
<h5 >Reset recovery codes</h5>
2021-05-19 04:39:27 +02:00
<p class="mb-0 me-3">Regenerate your two-factor recovery codes.</p>
2020-07-14 13:29:26 +02:00
</div>
<i class="fa fa-chevron-right"></i>
</a>
2020-07-13 08:13:27 +02:00
2020-07-14 13:29:26 +02:00
<a asp-action="EnableAuthenticator" class="list-group-item d-flex justify-content-between align-items-center list-group-item-action py-3">
<div>
<h5 >Configure Authenticator app</h5>
2021-05-19 04:39:27 +02:00
<p class="mb-0 me-3">Display the key or QR code to configure an authenticator app with your current setup.</p>
2020-07-14 13:29:26 +02:00
</div>
<i class="fa fa-chevron-right"></i>
</a>
<a asp-action="ResetAuthenticatorWarning" class="list-group-item d-flex justify-content-between align-items-center list-group-item-action py-3">
<div>
<h5 >Reset Authenticator app</h5>
2021-05-19 04:39:27 +02:00
<p class="mb-0 me-3">Invalidates the current authenticator configuration. Useful if you believe your authenticator settings were compromised.</p>
2020-07-14 13:29:26 +02:00
</div>
<i class="fa fa-chevron-right"></i>
</a>
}
else
{
<a asp-action="EnableAuthenticator" class="list-group-item d-flex justify-content-between align-items-center list-group-item-action py-3">
<div>
<h5 >Enable 2FA</h5>
2021-05-19 04:39:27 +02:00
<p class="mb-0 me-3">Enable two-factor authentication using TOTP with apps such as Google Authenticator.</p>
2020-07-14 13:29:26 +02:00
</div>
<i class="fa fa-chevron-right"></i>
</a>
}
2020-07-13 08:13:27 +02:00
</div>
2017-09-13 15:47:34 +09:00
2021-05-19 04:39:27 +02:00
@section PageFootContent {
2021-04-08 15:32:42 +02:00
<partial name="_ValidationScriptsPartial" />
2017-09-13 15:47:34 +09:00
}