From 5f11ee43509194f895932509a80bf0cc1e32a6c6 Mon Sep 17 00:00:00 2001 From: whoswhip Date: Tue, 10 Mar 2026 03:13:47 -0400 Subject: [PATCH] chore(backend): remove unnecessary settings --- SharpbinV3.Server/Services/AuthService.cs | 7 ------- SharpbinV3.Server/Settings/EmailSettings.cs | 1 - 2 files changed, 8 deletions(-) diff --git a/SharpbinV3.Server/Services/AuthService.cs b/SharpbinV3.Server/Services/AuthService.cs index ed331c6..ac5f2b1 100644 --- a/SharpbinV3.Server/Services/AuthService.cs +++ b/SharpbinV3.Server/Services/AuthService.cs @@ -226,11 +226,6 @@ namespace SharpbinV3.Server.Services { if (string.IsNullOrWhiteSpace(user.Email)) return; - if (string.IsNullOrWhiteSpace(_emailSettings.Verification_HMAC_Secret)) - { - _logger.LogWarning($"Email verification is not configured. Cannot send verification email to {user.Email}"); - return; - } string token = Utilities.GenerateSecureRandomString(EmailVerificationTokenLength); string tokenHash = Utilities.ComputeSha256(token); @@ -256,8 +251,6 @@ namespace SharpbinV3.Server.Services { if (token.Length != EmailVerificationTokenLength) return (false, "Invalid token."); - if (string.IsNullOrWhiteSpace(_emailSettings.Verification_HMAC_Secret)) - return (false, "Email verification is not configured."); string tokenHash = Utilities.ComputeSha256(token); var verificationToken = await _db.EmailVerificationTokens.Include(t => t.User).FirstOrDefaultAsync(t => t.TokenHash == tokenHash); diff --git a/SharpbinV3.Server/Settings/EmailSettings.cs b/SharpbinV3.Server/Settings/EmailSettings.cs index 85c8147..bb88e48 100644 --- a/SharpbinV3.Server/Settings/EmailSettings.cs +++ b/SharpbinV3.Server/Settings/EmailSettings.cs @@ -18,6 +18,5 @@ namespace SharpbinV3.Server.Settings [EmailAddress] public string? From { get; set; } - public string Verification_HMAC_Secret { get; set; } = string.Empty; } }