We've noticed that when an access token has expired, the token refresh is successful, but the initial API call that triggered the refresh then fails with a 401. Any made after this time work as expected.
It looks like the in memory token is not refreshed after refresh is called, and so it still uses the old access token for that call:
def access_token
token = fetch_token
if token.expired?
Util.log_info("Token Expired", store: store)
refresh
end
token.access_token
end
We've noticed that when an access token has expired, the token refresh is successful, but the initial API call that triggered the refresh then fails with a 401. Any made after this time work as expected.
It looks like the in memory
tokenis not refreshed afterrefreshis called, and so it still uses the old access token for that call: