Implement 2FA (#577)

* Initial work for TOTP 2FA

* Fix bug in 2FA code script

* Add translations for two factor and /disable2fa

* Fix compilation error

* Add TwoFactorLoginPage

* Add two factor login process

* Little bit of backup code work

* Finish two factor

* Fix unit tests

* ??? goofy ahh code

* Use SHA-256 instead of SHA-512

* I guess SHA-256 doesn't work either

* Fix comments in Base32 helper

* Move QRCoder package to website

* Add name to endregion comment in css

* Fix bug with redirects
This commit is contained in:
Josh 2022-12-12 21:11:39 -06:00 committed by GitHub
commit 14d2f0305e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 1077 additions and 20 deletions

View file

@ -0,0 +1,23 @@
@page "/remove2fa"
@using LBPUnion.ProjectLighthouse.Localization.StringLists
@model LBPUnion.ProjectLighthouse.Servers.Website.Pages.TwoFactor.DisableTwoFactorPage
@{
Layout = "Layouts/BaseLayout";
Model.Title = Model.Translate(TwoFactorStrings.DisableTwoFactor);
}
<div class="ui center segment center aligned">
<h2>@Model.Translate(TwoFactorStrings.DisableTwoFactor)</h2>
<p>@Model.Translate(TwoFactorStrings.DisableTwoFactorDescription)</p>
@await Html.PartialAsync("Partials/TwoFactorPartial", new ViewDataDictionary(ViewData)
{
{
"SubmitUrl", "/remove2fa"
},
{
"Error", Model.Error
},
})
</div>