ServerSideTicketStore.RenewAsync occurs with the wrong (old) expiry from the token #78
-
IdentityServer versionServer Side Sessions not renewing .NET version9.0 DescriptionServerSideTicketStore.RenewAsync occurs with the wrong (old) expiry from the token causing us to store the 'old' values for the token, and on subsequent requests, to consider the session expired when it isnt. See DuendeSoftware/products#1622 Reproduction steps.AddServerSideSessions(); Login - initial session is created Expected behaviorWhen cookie is over half of its age, sliding expiration should extend the cookie expiry, and this should result in the ticket being updated in the ServerSideSessionStore with the updated renewal and expiry times. LogsLogs from already logged in session. Session started 02/24/2025 12:19:21, with 60 minute expiry (request was after more than 30 minutes so should have extended session):
Duende.IdentityServer.Hosting.IdentityServerAuthenticationService: Debug: Augmenting SignInContext
Duende.IdentityServer.Stores.ServerSideTicketStore: Debug: Renewing AuthenticationTicket for key 9E9D17FCE832FC28C71D4BCB6A7E74459ACFAFAA577070D4EFA32406120B8DFF, with expiration: 02/24/2025 13:19:21
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler: Information: AuthenticationScheme: idsrv signed in.Additional contextReverting to 7.0.x resolves the issue. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
|
Thanks for the report. After looking at the changes you referenced it appeared there was a logic change there which could be causing the behavior you're observing. There are a few points I'd like to clarify to ensure I'm setting up my scenario to test this behavior similar to what you're observing:
|
Beta Was this translation helpful? Give feedback.
-
|
Hi @bhazen No we are not setting CoordinateLifetimeWithUserSession. Its all front channel. Our setup is that we have our IDP which implements IServerSideSessionStore. i.e. we do this: and our separate web app is an OIDC client. The flow is:
Expected (works on 7.0):
Actual (7.1)
|
Beta Was this translation helpful? Give feedback.
-
|
I've opened bug on our internal backlog for this. Thanks again for reporting the issue and your efforts in troubleshooting things. |
Beta Was this translation helpful? Give feedback.
-
|
IdentityServer 7.1.1 was just released, fixing this issue. Thanks again for reporting it! |
Beta Was this translation helpful? Give feedback.
IdentityServer 7.1.1 was just released, fixing this issue. Thanks again for reporting it!