feat(auth): adds local account authentication

This commit is contained in:
2025-05-12 15:45:12 -04:00
parent 6d7282870d
commit fdfca7c757
24 changed files with 1446 additions and 279 deletions

View File

@@ -0,0 +1,29 @@
using System.Threading.Tasks;
namespace Hutopy.Web.Features.Users.Services;
public interface IEmailSender
{
Task SendEmailAsync(string email, string subject, string message);
}
public class EmailSender(ILogger<IEmailSender> logger)
: IEmailSender
{
public async Task SendEmailAsync(string email, string subject, string message)
{
try
{
logger.LogInformation("Sending email to {Email} with subject: {Subject}", email, subject);
// TODO: Implement actual email sending logic
await Task.Delay(1000);
logger.LogInformation("Email sent successfully to {Email}", email);
}
catch (Exception ex)
{
logger.LogError(ex, "Failed to send email to {Email}", email);
throw;
}
}
}