IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

Question: idp session cookie is not sliding along with silent renewals

Open vejandla opened this issue 8 years ago • 4 comments

I am runnig through a weird problem. I am able to do the silent renew, but my idp cookie is getting sliding. More into the problem...

I have idp session cookie (idsrv) life time set to expire in 15 min and i kept the same time for Access and id token life time too.

On my JS client, i check user activity for every 2 min and if there is an activity in the last 2 min, i will renew the token.

I am able to get access and id token with renewed expiration times, but after 15 minuitues(idp cookie life time) silent renew calls are failing and idp is logging out. And i checked response of silent remew call, i see no cookies being set(with new slidingexpiration time) in the response headers.

Are there any settings i am supposed to enable at the server side? Appreciate your help.

vejandla avatar Nov 13 '18 11:11 vejandla

I am able to get access and id token with renewed expiration times, but after 15 minuitues(idp cookie life time) silent renew calls are failing and idp is logging out.

Sounds like your cookie at IdentityServer is set to fixed 15m, no sliding.

Having said that, this seems to be a general question about IdentityServer - not a bug report or an issue.

Please use one of the our free or commercial support options

See here for more details.

Thanks!

brockallen avatar Nov 13 '18 13:11 brockallen

Thanks for the reply @brockallen We enabled the sliding option while configuring the identity server.

vejandla avatar Nov 13 '18 13:11 vejandla

We need to override CookieAuthenticationOptions, this has nothing to do with IdentityServer but .NET framework, the cookie will slide only if it's past half way to expiry.

Check out this solution https://stackoverflow.com/questions/53292975/identityserver-session-cookie-is-not-sliding

gokulm avatar Nov 27 '18 15:11 gokulm

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 12 '20 17:01 lock[bot]