feat(email): add email verification html templates

This commit is contained in:
2026-03-10 03:20:48 -04:00
parent 5f11ee4350
commit 0564d55396
5 changed files with 169 additions and 5 deletions
+4 -5
View File
@@ -230,11 +230,10 @@ namespace SharpbinV3.Server.Services
string token = Utilities.GenerateSecureRandomString(EmailVerificationTokenLength);
string tokenHash = Utilities.ComputeSha256(token);
await _email.SendAsync(
user.Email,
"Verify Your Email",
$"{(_appSettings.Https ? "https" : "http")}://{_appSettings.Domain}/verify-email?token={token}"
);
string verificationUrl = $"{(_appSettings.Https ? "https" : "http")}://{_appSettings.Domain}/verify-email?token={token}";
string emailBody = EmailTemplates.VerifyEmail(verificationUrl, user.Username);
await _email.SendAsync(user.Email, "Verify Your Email - Sharpbin", emailBody);
var verificationToken = new EmailVerificationToken
{
TokenHash = tokenHash,