increase cookie timeout to 3 days

This commit is contained in:
Ryan Peters 2023-06-21 10:49:13 -04:00
parent c34dc876c0
commit c8f3c5225d

View File

@ -12,7 +12,8 @@ builder.Services.AddSingleton<INoteService, FileNoteService>();
builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(o => builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(o =>
{ {
o.LoginPath = "/login"; o.LoginPath = "/login";
o.Cookie.MaxAge = TimeSpan.FromHours(12); o.Cookie.Name = "NotesUser";
o.Cookie.MaxAge = TimeSpan.FromDays(3);
}); });
var app = builder.Build(); var app = builder.Build();