C
C#2y ago
nahr

❔ Authentication with owinCookie

Hi, I have an issue with the ExpireTimeSpan prop.
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddOwinCookie(CookieAuthenticationDefaults.AuthenticationScheme, 3, options =>
{
options.Cookie.Name = "random";
options.ExpireTimeSpan = TimeSpan.FromMinutes(1);
options.LoginPath = "/Account/Login";
});
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddOwinCookie(CookieAuthenticationDefaults.AuthenticationScheme, 3, options =>
{
options.Cookie.Name = "random";
options.ExpireTimeSpan = TimeSpan.FromMinutes(1);
options.LoginPath = "/Account/Login";
});
Why does not the cookie get cleared after 1 minute? If I add IsPersistent = true it works... but I dont want to use IsPersistent = true
var authProps = new AuthenticationProperties
{
IsPersistent = true,
IssuedUtc = DateTime.UtcNow
};
var authProps = new AuthenticationProperties
{
IsPersistent = true,
IssuedUtc = DateTime.UtcNow
};
Any ideas? Thx!
1 Reply
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server