I'm using .NET 5 and OpenID Connect, with cookie configured with SlidingExpiration = true and ExpireTimeSpan = 20 minutes.
What I observe is that while I am working on task in the application and not knowing the cookie's ticket has expire due to the ExpireTimeSpan. The application will not execute any function example: prompting me that time is about the expire or log me out.
What I understand so far is that SlidingExpiration should provide me with a new ticket if they refresh the page 10 mints or so, but what I notice it is otherwise.
So I wonder is there anyway I can get the cookie's ticket renew before the expire and the task/process should be transparent to me. What I notice in CookieAuthenticationHandler.cs there is a cool function call OnCheckSlidingExpiration. I am wondering how should I use that function in my current application.