I would like to use the Authorization module to be the source of truth for our users and roles mapping. I would like to implement the sign up flow so that after the user signs up, they are automatically added to one of the existing Groups already defined.
I would like to do this logic in a Rule. It can check to see if the (new) User is already in one or more Roles, if not then the Rule can use the API to add the User to a Role.
I basically want to use the “API” as referenced in the #1 answer in this question]1, but I can’t find what API to use inside a Rule. Are you able to point out the API or an example Rule? I see Rules that modify the user or app metadata, and also Rules that modify the payload of the id or access tokens being returned.
I want to do this as I already have Rules that will get the Roles and permissions based on the Roles the User is in and return the list of Permissions.