I have an API utility making all my requests from my fronted React app. It calls getTokenSilently each time I make an API request.
I have an upload to AWS functionality that works as follows:
upload files
makes entry in Mongodb for all entries (once)
uploads each file to aws
saves record that file has been uploaded (individually for each entry, when upload completes)
When I am uploading c. 25 files, the fourth step fails because the JWT from getTokenSilently comes through as undefined.
Is there a limit on the number of times I can call getTokenSilently in, say a minute? This is all on my local environment using the free Auth0 plan. I get a malformed Jwt error. A few other articles say I need to supply an audience in the Auth0Provider - which I have done. The error only comes up when I am doing c.25 uploads concurrently.
So basically it is using the existing client instance if it can find it instead of creating a new one each time. It’s also massively speeded up my application