Trying to generate access_token
using refresh token but getting invalid_grant
for couple of times. However, the same API is giving the access_token
after multiple attempts.
We are not facing this issue on our staging server where we have only one instance. This is coming on our production server only where we have more than one instances.
The problem is, ideally it should not give the access_token
once we got invalid_grant
but the same refresh_token
after multiple retries ends up giving the access_token
eventually. The grant_type
I am using is refresh_token
.
I have tried syncing the NTP time, setting the refresh token lifetime, going on all the instance where our service is deployed and checked which one is giving invalid_grant
but the one who is giving invalid_grant
is giving access_token
also.
Expected:
{ "access_token": "xx", "expires_in": 3600, "token_type": "Bearer", "refresh_token": "xz" }
Getting:
{"error": "invalid_grant"}