Current date\/time MUST be before the expiration date\/time listed in the 'exp' claim
Hello All,
I'm getting above mentioned error when the number of requests are high for box upload. This works absolutely fine when the number of requests are less. I raised the ticket with box but didn't got any satisfactory response. They asked me to check the server time with box server but if timing is the only issue then why it is working fine when the number of requests are very less? Also changing the server time is something not in our hand as we are using third party server. I searched on several other website but got the same answer i.e readjust your server time with box. Any suggestion here would be appreciated. Thanks in advance
-
Hi — based on your description, I think that what's happening here is something like the following scenario:
1. Your app generates a JWT with exp claim having time (current_time + N seconds)
2. Since there are a high number of requests being sent, the request with the above JWT gets rate limited, and must be retried later
3. The request is retried more than N seconds later and the exp claim encoded in the JWT is no longer valid, so the request fails with the error you mentioned
We've solved this issue in many of our Box SDKs by re-generating the JWT for requests that need to be retried; that way the exp claim is always current. Could you try making that change and let me know if that fixes your issue?
Please sign in to leave a comment.
Comments
1 comment