mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-06 09:36:20 +00:00
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:
parent
4fd1063502
commit
14d2f0305e
28 changed files with 1077 additions and 20 deletions
|
@ -27,6 +27,7 @@ public class AdminTests : LighthouseWebTest
|
|||
UserId = user.UserId,
|
||||
UserToken = CryptoHelper.GenerateAuthToken(),
|
||||
ExpiresAt = DateTime.Now + TimeSpan.FromHours(1),
|
||||
Verified = true,
|
||||
};
|
||||
|
||||
database.WebTokens.Add(webToken);
|
||||
|
@ -52,6 +53,7 @@ public class AdminTests : LighthouseWebTest
|
|||
UserId = user.UserId,
|
||||
UserToken = CryptoHelper.GenerateAuthToken(),
|
||||
ExpiresAt = DateTime.Now + TimeSpan.FromHours(1),
|
||||
Verified = true,
|
||||
};
|
||||
|
||||
database.WebTokens.Add(webToken);
|
||||
|
|
|
@ -89,6 +89,7 @@ public class AuthenticationTests : LighthouseWebTest
|
|||
UserId = user.UserId,
|
||||
UserToken = CryptoHelper.GenerateAuthToken(),
|
||||
ExpiresAt = DateTime.Now + TimeSpan.FromHours(1),
|
||||
Verified = true,
|
||||
};
|
||||
|
||||
database.WebTokens.Add(webToken);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue