I embed Web AppBuilder applications into another application and I'm having an intermittent issue authenticating. Some of the underlying data needs to be protected so I generate a token for authentication. I had an issue where the credentials could be viewed with browser dev tools (a no-no), so I have a proxy page that, given an ID will fetch the credentials out of a secure data store and send the token request to AGO. This works well, except for an intermittent issue where I get the following JSON from my token request:
{"error":{"code":400,"message":"Unable to generate token.","details":["Too many generate token requests. Please try again later."]}}
When this happens, my apps will not load on the first try, but may load just fine on subsequent tries. We have a lot of these apps, so finding the cause of this issue is paramount. Is there anyone that can comment on how many token requests an AGO/portal organization can receive before sending this error? My google searches have turned up nothing.