I am building an SPA which has to access User Management API directly and also need to authorize a custom API.
The library I use was auth0-js.
According to the document, if I want to access the User Management API, I have to get the accessToken first by reaching the /authorize endpoint which provided by auth0.
Also I have to provide a specific string to audience parameter for that.
And if I want to authorize additional custom API, I have to reaching the /authorize endpoint again by providing a different set of params including audience to get a different access token.
Is there any easy way for me to enter /authorize endpoint one time and get an access token that can both used for User Management API and my custom API ? Thanks…
What you described is totally correct. There is no universal way to get an access token that can be used for all APIs. Simply because of security reasons.
Thank you for the reply, so if I want to access auth0 User Management API and both my Custom API (which is also the audience) from front-end, what kind of implementation will you suggest?