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

Silent Renewel making two calls immediately to token end point

Open VijayaSaiRam opened this issue 3 years ago • 4 comments

Hi team,

I am this library for oauth2.0 implementation . It has been observed that, some times it is making two successive calls to token -end point in silent renewal of access_token. Though first call is successful, it is making the second call immediately to get the access token and refresh token, and next time , when the refresh token used in the previous call is used in token rotation, I am getting the error response from server saying,

{"error_descirption":"Unknown, invalid or expired refresh token" , "error":"invalid_grant"}

Could some one please help me to sort out this issue.

VijayaSaiRam avatar Jul 26 '22 09:07 VijayaSaiRam

Please enable logging or debug to find out the origin of the two calls. Without knowing where it is coming from its nearly impossible to help you...

pamapa avatar Jul 26 '22 14:07 pamapa

One call could be coming from SilentRenewService if settings.automaticSilentRenew == true, which is the default, the other one?

pamapa avatar Jul 26 '22 14:07 pamapa

I am using only this library for authentication purpose.. This is not happening all the time. Sometimes , it is making two calls one after the other immediately even the first call is success..

VijayaSaiRam avatar Jul 28 '22 13:07 VijayaSaiRam

Might be related to https://github.com/authts/oidc-client-ts/issues/430

pamapa avatar Aug 23 '22 15:08 pamapa

I'm having this same issue.

mparsakia avatar Nov 28 '23 22:11 mparsakia