set basic layout, error boundary, add QR code for 2FA

This commit is contained in:
2023-12-23 19:59:13 +01:00
parent 78ce5dc512
commit 0b15dd50ab
30 changed files with 1674 additions and 34 deletions
@@ -22,7 +22,7 @@
</li>
<li>
<p>Scan the QR Code or enter this key <kbd>@Model.SharedKey</kbd> into your two factor authenticator app. Spaces and casing do not matter.</p>
<div class="alert alert-info">Learn how to <a href="https://go.microsoft.com/fwlink/?Linkid=852423">enable QR code generation</a>.</div>
@* <div class="alert alert-info">Learn how to <a href="https://go.microsoft.com/fwlink/?Linkid=852423">enable QR code generation</a>.</div> *@
<div id="qrCode"></div>
<div id="qrCodeData" data-url="@Model.AuthenticatorUri"></div>
</li>
@@ -50,4 +50,7 @@
@section Scripts {
<partial name="_ValidationScriptsPartial" />
<script type="text/javascript" src="~/lib/qrcode/qrcode.min.js"></script>
<script type="text/javascript" src="~/js/qr.js"></script>
}
@@ -181,7 +181,7 @@ namespace Kemkas.Web.Areas.Identity.Pages.Account.Manage
return string.Format(
CultureInfo.InvariantCulture,
AuthenticatorUriFormat,
_urlEncoder.Encode("Microsoft.AspNetCore.Identity.UI"),
_urlEncoder.Encode("Kemkas"),
_urlEncoder.Encode(email),
unformattedKey);
}