ordercloud-api / ordercloud-dotnet-sdk

The official .NET SDK for the OrderCloud eCommerce platform
MIT License
15 stars 14 forks source link

Refresh token is not used for refreshing access token #44

Closed rminasian closed 2 years ago

rminasian commented 5 years ago

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.

tmenier commented 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.