Last post May 08, 2017 07:21 AM by Edward Z
Apr 18, 2017 05:57 AM|shashimokashi123|LINK
I am using cookies middleware authentication in ASP.Net core project.I want to know default timeout value for 'CookieAuthenticationOptions.ExpireTimeSpan'.
Also It would be great if anyone can specify default flag value for 'CookieAuthenticationOptions.SlidingExpiration'.
I am not able to get official default values for CookieAuthenticationOptions anywhere. So any help in this regard would be great.
Apr 18, 2017 06:49 AM|oned_gk|LINK
Apr 19, 2017 05:21 AM|AngelinaJolie|LINK
I find somebody says that "By default, the cookies lifetime is closed until the browser is closed." ，so I guess that the default timeout for .net core is same as that due to I don't find out somebody tell about it in .net core .
and this body says that 'SlidingExpiration is true by default).: from
May 08, 2017 07:21 AM|Edward Z|LINK
>> I want to know default timeout value for 'CookieAuthenticationOptions.ExpireTimeSpan'.
Per to the source code of Microsoft.AspNetCore.Authentication.Cookies,
default value for ExpireTimeSpan is TimeSpan.FromDays(14) and SlidingExpiration is true.
ReturnUrlParameter = CookieAuthenticationDefaults.ReturnUrlParameter;
ExpireTimeSpan = TimeSpan.FromDays(14);
SlidingExpiration = true;
CookieHttpOnly = true;
CookieSecure = CookieSecurePolicy.SameAsRequest;
Events = new CookieAuthenticationEvents();