Is calling the M2M flow within an Action the only way for an Action to get an access token for an audience other than the management api?
Our login flow requires us to hit our backend api to retrieve some information that we set in the users access token claims. The api is authenticated through Auth0 jwts. We’ve been doing this with a post login action, but retrieving a new token each for each Action execution rapidly uses up the monthly M2M access token limit. I’m aware that Actions now have a cache we could utilize, but the documentation states it only lasts for 15 minutes at time.
Is there an easier way to do this that I’m missing? Any insight is appreciated
Caching your M2M tokens in an Action is the best way to minimize the number of requests for a new token. And that is correct, our documentation here states that cached items will persist for a maximum of 15 minutes.
For most scenarios, this strategy should mitigate going over your M2M Auth Quota utilization.