mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
chore(backend): remove unnecessary settings
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -18,6 +18,5 @@ namespace SharpbinV3.Server.Settings
|
||||
|
||||
[EmailAddress]
|
||||
public string? From { get; set; }
|
||||
public string Verification_HMAC_Secret { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user