resend
This commit is contained in:
@@ -19,6 +19,7 @@ using Webshop.Application.Services.Public.Interfaces;
|
||||
using Webshop.Application.Services.Customers.Interfaces;
|
||||
using Webshop.Application.Services.Customers;
|
||||
using Webshop.Domain.Identity;
|
||||
using Resend;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
@@ -45,7 +46,7 @@ builder.Services.Configure<IdentityOptions>(options =>
|
||||
options.Password.RequireNonAlphanumeric = false;
|
||||
options.Password.RequireUppercase = false;
|
||||
options.Password.RequireLowercase = false;
|
||||
options.SignIn.RequireConfirmedEmail = false; // F<>r einfache Entwicklung/Tests
|
||||
options.SignIn.RequireConfirmedEmail = true; // F<>r einfache Entwicklung/Tests
|
||||
});
|
||||
|
||||
|
||||
@@ -93,6 +94,16 @@ builder.Services.AddScoped<IAdminSupplierService, AdminSupplierService>();
|
||||
// CUSTOMER Services (sp<73>ter Implementierungen hinzuf<75>gen)
|
||||
builder.Services.AddScoped<ICustomerService, CustomerService>();
|
||||
|
||||
// --- NEU: Resend E-Mail-Dienst konfigurieren ---
|
||||
builder.Services.AddOptions(); // Stellt sicher, dass Options konfiguriert werden k<>nnen
|
||||
builder.Services.AddHttpClient<ResendClient>(); // F<>gt HttpClient f<>r Resend hinzu
|
||||
builder.Services.Configure<ResendClientOptions>(options =>
|
||||
{
|
||||
// Der API-Token kommt aus den Konfigurationen (z.B. appsettings.json oder Umgebungsvariablen)
|
||||
options.ApiToken = builder.Configuration["Resend:ApiToken"]!; // << ANPASSEN >>
|
||||
});
|
||||
builder.Services.AddTransient<IResend, ResendClient>();
|
||||
|
||||
|
||||
// 5. Controller und Swagger/OpenAPI hinzuf<75>gen
|
||||
builder.Services.AddControllers();
|
||||
|
||||
Reference in New Issue
Block a user