mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 22:46:49 +01:00
72 lines
3.1 KiB
Text
72 lines
3.1 KiB
Text
@model EnableAuthenticatorViewModel
|
|
@{
|
|
ViewData.SetActivePageAndTitle(ManageNavPages.TwoFactorAuthentication, "Enable authenticator app");
|
|
}
|
|
|
|
<div>
|
|
<p>To use an authenticator app go through the following steps:</p>
|
|
<ol class="list">
|
|
<li class="mb-5">
|
|
<div class="mb-2">Download a two-factor authenticator app like …</div>
|
|
<ul>
|
|
<li>
|
|
Microsoft Authenticator for
|
|
<a href="https://go.microsoft.com/fwlink/?Linkid=825072">Android</a> or
|
|
<a href="https://go.microsoft.com/fwlink/?Linkid=825073">iOS</a>
|
|
</li>
|
|
<li>
|
|
Google Authenticator for
|
|
<a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en">Android</a> or
|
|
<a href="https://itunes.apple.com/us/app/google-authenticator/id388497605?mt=8">iOS</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="mb-5">
|
|
<p class="mb-2">Scan the QR Code or enter the following key into your two factor authenticator app:</p>
|
|
<p class="mb-4">
|
|
<code class="mr-3">@Model.SharedKey</code>
|
|
<span class="text-secondary">(spaces and casing do not matter)</span>
|
|
</p>
|
|
<div id="qrCode"></div>
|
|
<div id="qrCodeData" data-url="@Model.AuthenticatorUri"></div>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
Your two factor authenticator app will provide you with a unique code.
|
|
<br/>
|
|
Enter the code in the confirmation box below.
|
|
</p>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<form method="post">
|
|
<input asp-for="AuthenticatorUri" type="hidden" />
|
|
<input asp-for="SharedKey" type="hidden" />
|
|
<div class="form-group">
|
|
<label asp-for="Code" class="control-label">Verification Code</label>
|
|
<input asp-for="Code" class="form-control" autocomplete="off" />
|
|
<span asp-validation-for="Code" class="text-danger"></span>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Verify</button>
|
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
|
|
@section Scripts {
|
|
@await Html.PartialAsync("_ValidationScriptsPartial")
|
|
<script type="text/javascript" src="~/js/qrcode.js" asp-append-version="true"></script>
|
|
<script type="text/javascript">
|
|
new QRCode(document.getElementById("qrCode"),
|
|
{
|
|
text: @Safe.Json(Model.AuthenticatorUri),
|
|
width: 200,
|
|
height: 200,
|
|
useSVG: true,
|
|
correctLevel : QRCode.CorrectLevel.M
|
|
});
|
|
$("#qrCode > img").css({ "margin": "auto" });
|
|
</script>
|
|
}
|