From 2d6de28fbf03249827424cc298ce4e4f7bb4eefd Mon Sep 17 00:00:00 2001 From: support Date: Mon, 23 Nov 2026 07:17:50 +0100 Subject: [PATCH 1/2] Keep a panel sign-in for 12 hours instead of a year The admin, store and vendor panels shipped CookieAuthExpires = 8760, so a staff sign-in cookie stayed valid for a year, also after the browser had been left alone. The three panels now ship 12 hours. The cookie is renewed for the same span while the panel is used, so an active session goes on and an idle one ends. The storefront keeps its year. --- src/Web/Grand.Web.Admin/App_Data/appsettings.json | 5 +++-- src/Web/Grand.Web.Store/App_Data/appsettings.json | 5 +++-- src/Web/Grand.Web.Vendor/App_Data/appsettings.json | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Web/Grand.Web.Admin/App_Data/appsettings.json b/src/Web/Grand.Web.Admin/App_Data/appsettings.json index e76fdf99e2..f5de1b63e9 100644 --- a/src/Web/Grand.Web.Admin/App_Data/appsettings.json +++ b/src/Web/Grand.Web.Admin/App_Data/appsettings.json @@ -83,8 +83,9 @@ //Key persistence location you can point to a directory on the local machine, or it can point to a folder on a network share. //if is null it will use the default directory path - ApplicationPath\App_Data\DataProtectionKeys "KeyPersistenceLocation": "", - //Gets or sets a value indicating for cookie auth expires in hours - default 24 * 365 = 8760 - "CookieAuthExpires": 8760, + //Gets or sets a value indicating for cookie auth expires in hours. A staff sign-in lasts 12 hours and is renewed + //while the panel is in use, so an idle session ends; the storefront keeps a long sign-in (8760 = 24 * 365) + "CookieAuthExpires": 12, //Gets or sets a value for cookie prefix - any changes will log out all of the customers "CookiePrefix": ".Grand.", //Gets or sets a value for cookie claim issuer - any changes will log out all of the customers diff --git a/src/Web/Grand.Web.Store/App_Data/appsettings.json b/src/Web/Grand.Web.Store/App_Data/appsettings.json index cbfda6b718..cbf6e1404b 100644 --- a/src/Web/Grand.Web.Store/App_Data/appsettings.json +++ b/src/Web/Grand.Web.Store/App_Data/appsettings.json @@ -83,8 +83,9 @@ //Key persistence location you can point to a directory on the local machine, or it can point to a folder on a network share. //if is null it will use the default directory path - ApplicationPath\App_Data\DataProtectionKeys "KeyPersistenceLocation": "", - //Gets or sets a value indicating for cookie auth expires in hours - default 24 * 365 = 8760 - "CookieAuthExpires": 8760, + //Gets or sets a value indicating for cookie auth expires in hours. A staff sign-in lasts 12 hours and is renewed + //while the panel is in use, so an idle session ends; the storefront keeps a long sign-in (8760 = 24 * 365) + "CookieAuthExpires": 12, //Gets or sets a value for cookie prefix - any changes will log out all of the customers "CookiePrefix": ".Grand.", //Gets or sets a value for cookie claim issuer - any changes will log out all of the customers diff --git a/src/Web/Grand.Web.Vendor/App_Data/appsettings.json b/src/Web/Grand.Web.Vendor/App_Data/appsettings.json index e76fdf99e2..f5de1b63e9 100644 --- a/src/Web/Grand.Web.Vendor/App_Data/appsettings.json +++ b/src/Web/Grand.Web.Vendor/App_Data/appsettings.json @@ -83,8 +83,9 @@ //Key persistence location you can point to a directory on the local machine, or it can point to a folder on a network share. //if is null it will use the default directory path - ApplicationPath\App_Data\DataProtectionKeys "KeyPersistenceLocation": "", - //Gets or sets a value indicating for cookie auth expires in hours - default 24 * 365 = 8760 - "CookieAuthExpires": 8760, + //Gets or sets a value indicating for cookie auth expires in hours. A staff sign-in lasts 12 hours and is renewed + //while the panel is in use, so an idle session ends; the storefront keeps a long sign-in (8760 = 24 * 365) + "CookieAuthExpires": 12, //Gets or sets a value for cookie prefix - any changes will log out all of the customers "CookiePrefix": ".Grand.", //Gets or sets a value for cookie claim issuer - any changes will log out all of the customers From 4990fefd1b65b3a7216f734baf9f6c3e02d4ff9b Mon Sep 17 00:00:00 2001 From: support Date: Mon, 23 Nov 2026 07:18:46 +0100 Subject: [PATCH 2/2] Describe the panel sign-in lifetime as absolute The sign-in sets ExpiresUtc, which the cookie handler treats as an absolute expiry and does not renew, so the comment no longer says the session is renewed while in use. --- src/Web/Grand.Web.Admin/App_Data/appsettings.json | 4 ++-- src/Web/Grand.Web.Store/App_Data/appsettings.json | 4 ++-- src/Web/Grand.Web.Vendor/App_Data/appsettings.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Web/Grand.Web.Admin/App_Data/appsettings.json b/src/Web/Grand.Web.Admin/App_Data/appsettings.json index f5de1b63e9..15aa0b3c08 100644 --- a/src/Web/Grand.Web.Admin/App_Data/appsettings.json +++ b/src/Web/Grand.Web.Admin/App_Data/appsettings.json @@ -83,8 +83,8 @@ //Key persistence location you can point to a directory on the local machine, or it can point to a folder on a network share. //if is null it will use the default directory path - ApplicationPath\App_Data\DataProtectionKeys "KeyPersistenceLocation": "", - //Gets or sets a value indicating for cookie auth expires in hours. A staff sign-in lasts 12 hours and is renewed - //while the panel is in use, so an idle session ends; the storefront keeps a long sign-in (8760 = 24 * 365) + //Gets or sets a value indicating for cookie auth expires in hours. A staff sign-in ends 12 hours after it was made, + //whether the panel is in use or not; the storefront keeps a long sign-in (8760 = 24 * 365) "CookieAuthExpires": 12, //Gets or sets a value for cookie prefix - any changes will log out all of the customers "CookiePrefix": ".Grand.", diff --git a/src/Web/Grand.Web.Store/App_Data/appsettings.json b/src/Web/Grand.Web.Store/App_Data/appsettings.json index cbf6e1404b..273e312ce3 100644 --- a/src/Web/Grand.Web.Store/App_Data/appsettings.json +++ b/src/Web/Grand.Web.Store/App_Data/appsettings.json @@ -83,8 +83,8 @@ //Key persistence location you can point to a directory on the local machine, or it can point to a folder on a network share. //if is null it will use the default directory path - ApplicationPath\App_Data\DataProtectionKeys "KeyPersistenceLocation": "", - //Gets or sets a value indicating for cookie auth expires in hours. A staff sign-in lasts 12 hours and is renewed - //while the panel is in use, so an idle session ends; the storefront keeps a long sign-in (8760 = 24 * 365) + //Gets or sets a value indicating for cookie auth expires in hours. A staff sign-in ends 12 hours after it was made, + //whether the panel is in use or not; the storefront keeps a long sign-in (8760 = 24 * 365) "CookieAuthExpires": 12, //Gets or sets a value for cookie prefix - any changes will log out all of the customers "CookiePrefix": ".Grand.", diff --git a/src/Web/Grand.Web.Vendor/App_Data/appsettings.json b/src/Web/Grand.Web.Vendor/App_Data/appsettings.json index f5de1b63e9..15aa0b3c08 100644 --- a/src/Web/Grand.Web.Vendor/App_Data/appsettings.json +++ b/src/Web/Grand.Web.Vendor/App_Data/appsettings.json @@ -83,8 +83,8 @@ //Key persistence location you can point to a directory on the local machine, or it can point to a folder on a network share. //if is null it will use the default directory path - ApplicationPath\App_Data\DataProtectionKeys "KeyPersistenceLocation": "", - //Gets or sets a value indicating for cookie auth expires in hours. A staff sign-in lasts 12 hours and is renewed - //while the panel is in use, so an idle session ends; the storefront keeps a long sign-in (8760 = 24 * 365) + //Gets or sets a value indicating for cookie auth expires in hours. A staff sign-in ends 12 hours after it was made, + //whether the panel is in use or not; the storefront keeps a long sign-in (8760 = 24 * 365) "CookieAuthExpires": 12, //Gets or sets a value for cookie prefix - any changes will log out all of the customers "CookiePrefix": ".Grand.",