Open robertsoniv opened 2 months ago
I realize now that we are using axios under the hood of tanstack to build up dynamic requests based on the API spec. So we theoretically could try and take advantage of interceptors, however, I think it makes more sense to solve this at the provider level - right now we have a verifyToken call that is made based of a local token
state in the provider. We should add and track another local refreshToken
state.
Someone reported that the refresh token duration has no affect on the accelerator applications.
Issue for reference: https://github.com/ordercloud-api/oc-accelerator/issues/32
This should be solved at this package level, likely as part of the default retry function or, more ideally, before an expired token is used on any request - similar to how interceptors work in axios. Let's see what part of tanstack query would work best for this scenario.