angular-auth-oidc-client icon indicating copy to clipboard operation
angular-auth-oidc-client copied to clipboard

[Question]: Why is the session refreshed even if the expire date has not been exceeded?

Open Dogemist opened this issue 1 year ago • 1 comments

What Version of the library are you using? 16.0.1

Question I have this configuration

authority: ${environment.authorityUrl}/oidc, redirectUrl: ${environment.redirectUrl}, postLogoutRedirectUri: ${environment.redirectUrl}, clientId: 'username', scope: 'openid profile email offline_access', responseType: 'code', silentRenew: true, useRefreshToken: true,

And my access token have an expiration of 8 hours image

After an hour I receive this message image

Then, when the first page refresh happen, the library mark the user as not logged and start a cycle with the provider (the user is "not logged" -> it returns 500 -> return to the web app -> the user is not logged -> and so on... (this is a problem that we are investigating)).

The question is: why, after an hours, the session "expire" (or check if there's a refresh token) even if the access token have a future expiration date? Should it check first if the access token is expired and then refresh it if it has?

Thanks

Dogemist avatar Nov 09 '23 13:11 Dogemist

What is the expiration time of your id_token?

tenstan avatar Dec 29 '23 10:12 tenstan