Box Refresh Token Was Expired Within 3 to 4 Hours
Hi,
Currently, we try to integrate our app with Box. We encounter an issue with the refresh token is expired. We only store refresh token in the file. When we perform file operation by using a refresh token in a multi-thread environment, some devices will fail because the existing refresh token has been invalidated.
Can you please suggest how to solve this issue?
Thank You
-
As already mentioned by you, your env is multi threaded and the most probable reason for the expiry is one of the thread uses the refresh token and by the time it updates the new token another thread triggered the refresh activity which failed as the refresh tokens expire after every use.
You can apply a lock and wait mechanism for the tokens to ensure no simultaneous calls are made to Box.
サインインしてコメントを残してください。
コメント
1件のコメント