From 2c0912297101a2733946ba9ae23dc86db56fab8b Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Mon, 4 Nov 2024 03:15:13 +0300 Subject: [PATCH] fix: add cookie expire time --- Security/Common/Domain/RequestContextInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Security/Common/Domain/RequestContextInfo.cs b/Security/Common/Domain/RequestContextInfo.cs index 7eee08d..28b0cef 100644 --- a/Security/Common/Domain/RequestContextInfo.cs +++ b/Security/Common/Domain/RequestContextInfo.cs @@ -22,7 +22,7 @@ internal class RequestContextInfo if (string.IsNullOrEmpty(fingerprint)) { fingerprint = Guid.NewGuid().ToString().Replace("-", "") + GeneratorKey.GenerateString(32); - cookieOptions.SetCookie(context, CookieNames.FingerprintToken, fingerprint); + cookieOptions.SetCookie(context, CookieNames.FingerprintToken, fingerprint, DateTimeOffset.UtcNow.AddYears(10)); } UserAgent = userAgent;