Good day.
We are building small b2b app, which relies on Organizations feature, and utilizes Actions quite heavily.
We rely on Auth0’s TS(JS) Kit for Auth0-related interactions within codebase.
Setup:
We have quite a trivial task, of getting a User’s memberships in different organizations, including roles.
At the moment we achieve that by
- Getting membership in organizations
- ForEach request roles
That works, but is quite demanding on network (several subrequests), and is not too efficient, as we think
Alternatives:
We came up with an idea of maybe getting this info within the Action.
First issue we faced is that unfortunately it is not available there OOB (not in user information and/or apis).
But, as you probably know - one can get ManagementClinet in Action, using something like this: How can I use the Management API in Actions?, and then - run pretty much any request that ManagementClient can deliver. THus - just move our wf there.
Thus, the Questions:
1. This method (creating ManagementClient instance in Action, running getOrganizations, then getRoles per each Organization within Action)- does it have a huge impact on the speed of the process?
I mean, currently we:
- Get the Login Done
- Get the organizations Info.
1st step is done fast, and is non-blocking for the end-user.
If we move 2nd step into same action - it will ofc make it slower, but question is - how bad it’s gonna be?
As bad as outside of action? Or at least a bit faster?
2. Any alternatives to this method?
3. Is there any plans to somehow expose this kind of information in more efficient way?
Because it feels a bit… unefficient to make subrequests per organization just to get participant’s roles, and imho does not facilitates usage of Organizations.
We even considered at some point switching to just storing RBAC-alike filters in metadata, and drop usage of the whole Org feature…
4. Is there a plans for more natively support ManagementClient within Actions, and if yes - any schedules, at least theoretical ones?
Why I’m asking is - again - because I consider that being a very good “native” extention of Actions per-se, which we would deff use for that, and other tasks.
Thank you in advance.
BR, Seva