Изменен способ хранения ключей

This commit is contained in:
FrigaT
2026-04-14 15:22:47 +03:00
parent 68887284c1
commit b46e3a0715
7 changed files with 683 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.IdentityModel.Tokens;
@@ -95,7 +96,9 @@ public class Program
builder.Services.AddScoped<TrackAdditionLogService>();
builder.Services.AddScoped<TrackRemovalLogService>();
builder.Services.AddScoped<FavoritesService>();
builder.Services.AddDataProtection();
builder.Services.AddDataProtection()
.PersistKeysToDbContext<ApplicationDbContext>()
.SetApplicationName("PlaylistShared.Api");
builder.Services.AddHttpClient();