feat(HomeController): Funktion zur Überprüfung des Authenticator-Codes hinzugefügt.

This commit is contained in:
Developer 02
2024-12-11 18:32:35 +01:00
parent 27db664b4d
commit c41d5c4a76
2 changed files with 10 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ namespace EnvelopeGenerator.Extensions
{
public static class StringExtension
{
public static bool IsValidTotp(string totp, string secret)
public static bool IsValidTotp(this string totp, string secret)
{
var secret_bytes = Base32Encoding.ToBytes(secret);
var secret_totp = new Totp(secret_bytes);