From 1ac02d14a8901056c3cca7382445e338b16ffb18 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 29 Sep 2022 20:37:06 +0100 Subject: [PATCH] increasing cookie expiry to a month --- Selector.Web/Options.cs | 2 ++ Selector.Web/Startup.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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";