In Loginmy method AccountController, I have the following:
var claims = new List<Claim>();
claims.Add(new Claim(ClaimTypes.Name, model.UserName));
AuthenticationManager.SignIn(
new AuthenticationProperties { IsPersistent = model.RememberMe,
ExpiresUtc = expiry },
new ClaimsIdentity(claims, DefaultAuthenticationTypes.ApplicationCookie));
where expiryis the calculated value DateTimeOffset.
No matter what I set for the value expiry, the expiration is .AspNet.ApplicationCookiealways 14 days.
Is there any way to set this expiration value?
Is this related to https://katanaproject.codeplex.com/workitem/115 ?
Please note that Startup.Auth.csI do not have a set of properties ExpireTimeSpan. When I set this property, its value is respected, and the above approach still does nothing.
source
share