Closed rminasian closed 2 years ago
Apologies that we never replied to this. The lack of first-class support for refresh tokens was again pointed out in #92, and you are absolutely right that when the SDK detects an expired token, refreshing, not re-authenticating, should be the first course of action. This will be added in conjunction with #92.
It is possible to store Token response in OrderCloud client so that it takes access token. Once access token expires, SDK tries to re-login using username/password or clientid/secret. However, the first thing it should do is using refresh token to try to get a new access token as that's what refresh token is for.