diff --git a/Selector.Web/Options.cs b/Selector.Web/Options.cs index 80fe477..388c7e7 100644 --- a/Selector.Web/Options.cs +++ b/Selector.Web/Options.cs @@ -41,6 +41,8 @@ namespace Selector.Web public string LastfmClient { get; set; } public string LastfmSecret { get; set; } + public TimeSpan CookieExpiry { get; set; } = TimeSpan.FromDays(30); + public RedisOptions RedisOptions { get; set; } = new(); public NowPlayingOptions NowOptions { get; set; } = new(); diff --git a/Selector.Web/Startup.cs b/Selector.Web/Startup.cs index 0c43f94..ea9f355 100644 --- a/Selector.Web/Startup.cs +++ b/Selector.Web/Startup.cs @@ -97,7 +97,7 @@ namespace Selector.Web { // Cookie settings options.Cookie.HttpOnly = true; - options.ExpireTimeSpan = TimeSpan.FromDays(1); + options.ExpireTimeSpan = config.CookieExpiry; options.LoginPath = "/Identity/Account/Login"; options.AccessDeniedPath = "/Identity/Account/AccessDenied";