2017-09-13 15:47:34 +09:00
|
|
|
@model EnableAuthenticatorViewModel
|
|
|
|
@{
|
2021-12-16 11:17:02 +01:00
|
|
|
ViewData.SetActivePage(ManageNavPages.TwoFactorAuthentication, "Enable authenticator app");
|
2017-09-13 15:47:34 +09:00
|
|
|
}
|
|
|
|
|
2022-01-27 03:56:46 +01:00
|
|
|
<div class="col-xl-8 col-xxl-constrain">
|
2022-01-17 17:19:27 -08:00
|
|
|
<h3>Enable Authenticator</h3>
|
|
|
|
<p class="my-3">To use an authenticator app go through the following steps:</p>
|
2017-10-27 17:53:04 +09:00
|
|
|
<ol class="list">
|
2020-07-08 19:19:29 +02:00
|
|
|
<li class="mb-5">
|
|
|
|
<div class="mb-2">Download a two-factor authenticator app like …</div>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
Microsoft Authenticator for
|
2021-11-11 13:03:08 +01:00
|
|
|
<a href="https://play.google.com/store/apps/details?id=com.azure.authenticator" rel="noreferrer noopener">Android</a> or
|
|
|
|
<a href="https://itunes.apple.com/us/app/microsoft-authenticator/id983156458" rel="noreferrer noopener">iOS</a>
|
2020-07-08 19:19:29 +02:00
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
Google Authenticator for
|
2021-07-06 10:35:42 +02:00
|
|
|
<a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en" rel="noreferrer noopener">Android</a> or
|
|
|
|
<a href="https://itunes.apple.com/us/app/google-authenticator/id388497605?mt=8" rel="noreferrer noopener">iOS</a>
|
2020-07-08 19:19:29 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
2017-10-27 17:53:04 +09:00
|
|
|
</li>
|
2020-07-08 19:19:29 +02:00
|
|
|
<li class="mb-5">
|
2021-09-13 03:16:52 +02:00
|
|
|
<p class="mb-2">Scan the QR Code or enter the following key into your two-factor authenticator app:</p>
|
2020-07-08 19:19:29 +02:00
|
|
|
<p class="mb-4">
|
2021-05-19 04:39:27 +02:00
|
|
|
<code class="me-3">@Model.SharedKey</code>
|
2020-07-08 19:19:29 +02:00
|
|
|
<span class="text-secondary">(spaces and casing do not matter)</span>
|
|
|
|
</p>
|
2017-10-27 17:53:04 +09:00
|
|
|
<div id="qrCode"></div>
|
2019-08-10 14:05:11 +09:00
|
|
|
<div id="qrCodeData" data-url="@Model.AuthenticatorUri"></div>
|
2017-10-27 17:53:04 +09:00
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<p>
|
2021-09-13 03:16:52 +02:00
|
|
|
Your two-factor authenticator app will provide you with a unique code.
|
2020-07-08 19:19:29 +02:00
|
|
|
<br/>
|
|
|
|
Enter the code in the confirmation box below.
|
2022-01-27 03:56:46 +01:00
|
|
|
</p>
|
|
|
|
<form method="post">
|
|
|
|
<input asp-for="AuthenticatorUri" type="hidden" />
|
|
|
|
<input asp-for="SharedKey" type="hidden" />
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="Code" class="form-label">Verification Code</label>
|
2022-06-06 11:57:42 +02:00
|
|
|
<input asp-for="Code" class="form-control" autocomplete="off" autofocus style="width:14ch"/>
|
2022-01-27 03:56:46 +01:00
|
|
|
<span asp-validation-for="Code" class="text-danger"></span>
|
2017-10-27 17:53:04 +09:00
|
|
|
</div>
|
2022-01-27 03:56:46 +01:00
|
|
|
<button type="submit" class="btn btn-primary mt-2">Verify</button>
|
|
|
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
|
|
|
</form>
|
2017-10-27 17:53:04 +09:00
|
|
|
</li>
|
|
|
|
</ol>
|
2017-09-13 15:47:34 +09:00
|
|
|
</div>
|
|
|
|
|
2021-05-19 04:39:27 +02:00
|
|
|
@section PageFootContent {
|
2021-04-08 15:32:42 +02:00
|
|
|
<partial name="_ValidationScriptsPartial" />
|
2021-05-19 04:39:27 +02:00
|
|
|
<script src="~/js/qrcode.js" asp-append-version="true"></script>
|
|
|
|
<script>
|
|
|
|
new QRCode(document.getElementById("qrCode"), {
|
|
|
|
text: @Safe.Json(Model.AuthenticatorUri),
|
|
|
|
width: 200,
|
|
|
|
height: 200,
|
|
|
|
useSVG: true,
|
|
|
|
correctLevel : QRCode.CorrectLevel.M
|
|
|
|
});
|
2018-10-09 23:21:05 +09:00
|
|
|
$("#qrCode > img").css({ "margin": "auto" });
|
2017-10-27 17:53:04 +09:00
|
|
|
</script>
|
2017-09-13 15:47:34 +09:00
|
|
|
}
|