oidc-client-ts icon indicating copy to clipboard operation
oidc-client-ts copied to clipboard

Automatic token renew on max sliding delay

Open TheMaskedTurtle opened this issue 1 year ago • 2 comments

Still to improve the automatic token renew experience, I have the need to renew tokens before the session cookie expires.

Would it be possible to add other events to the UserManager, like SessionExpiring and SessionExpired in the same manner as #1301 based on a user-defined value in the settings to raise after a delay since the last token renewal ?

TheMaskedTurtle avatar Dec 14 '23 14:12 TheMaskedTurtle

this library does not deal and has no information about session cookies...

pamapa avatar Dec 15 '23 10:12 pamapa

Hi @pamapa,

Thanks for your quick answer.

Yes, even if this new UserManager event would help to manage session cookie TTL it wouldn't be based on information contained in the cookie directly. It would just be an additional timer with a duration set in the application configuration directly in UserManagerSettings for example, and raise an event when this duration has been reached since last renewal.

TheMaskedTurtle avatar Dec 15 '23 11:12 TheMaskedTurtle