program cs e
builder.Services.ConfigureApplicationCookie(options =>
{
options.Cookie.Name = "istediginisism";
options.Cookie.HttpOnly = true;
//bir günlük oturum çerezi
options.ExpireTimeSpan = TimeSpan.FromDays(1);
options.SlidingExpiration = false;
//kullanıcı giriş sayfanın adres yolu
options.LoginPath = new PathString("/enter");
options.AccessDeniedPath = new PathString("/enter");
options.ReturnUrlParameter = CookieAuthenticationDefaults.ReturnUrlParameter;
});
builder.Services.AddDataProtection().SetApplicationName($"my-app-{builder.Environment.EnvironmentName}")
.PersistKeysToFileSystem(new DirectoryInfo($@"{builder.Environment.ContentRootPath}\keys"));