Closed mlaflamme49 closed 2 days ago
This line of code might be the problem:
options.UseTokenLifetime = true;
This will ignore ExpireTimeSpan
setting and will set the cookie lifetime to the lifetime of the identity token which is very short.
It did the trick, thanks
Which version of Duende BFF are you using? 7.0.5 Which version of .NET are you using? 8 Describe the bug Hi, I'm using BFF and trying to extend the delay of inactivity allowed to the user before they need to log back in. Currently it expires after a few minutes even tough I set the session timeout to 3 hours. Should I send keepalive requests to my API ? I'm suspecting something is off in my configuration(see below) Thanks ` BFF builder.Services.AddAuthentication(options => { options.DefaultScheme = "cookie"; options.DefaultChallengeScheme = "oidc"; options.DefaultSignOutScheme = "oidc"; }).AddCookie("cookie", options => { // options.Cookie.Domain = ISConf.CookieDomain; options.Cookie.Name = ISConf.CookieName; options.Cookie.SameSite = SameSiteMode.Strict; options.ExpireTimeSpan = new TimeSpan(0, ISConf.SessionExpirationMinutes, 0); /3 hours/ options.SlidingExpiration = true; }).AddOpenIdConnect("oidc", options => { options.Authority = ISConf.Authority; options.ClientId = ISConf.IS.ClientId; options.ClientSecret = ISConf.IS.ClientSecret;
});
//Identity server builder.Services .AddIdentityServer(options => { options.Events.RaiseErrorEvents = true; options.Events.RaiseInformationEvents = true; options.Events.RaiseFailureEvents = true; options.Events.RaiseSuccessEvents = true;
`