CookieAuthenticationOptions.ExpireTimeSpan Property

Definition

Controls how much time the authentication ticket stored in the cookie will remain valid from the point it is created. The expiration information is stored in the protected cookie ticket. Because of that an expired cookie will be ignored even if it is passed to the server after the browser should have purged it.

This is separate from the value of Expires, which specifies how long the browser will keep the cookie.

C#
public TimeSpan ExpireTimeSpan { get; set; }

Property Value

Applies to

Product Versions
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0