I am developing a solution, where I would like to set a default user role, on user registration.
Sub question 1) Can this be done directly in the hook?
With Auth0 rules, our team used to do something like this:
var ManagementClient = require('auth0@2.17.0').ManagementClient;
var management = new ManagementClient({
token: auth0.accessToken,
domain: auth0.domain,
});
management.assignRolestoUser( //etc.
Sub question 2) If I POST our own application server, and set the role their using the auth0 management API, will the user have the role assigned on the first login? If I remember correctly, this is something Auth0 advised against when writing rules.
@konrad.sopala can you with this one? Thanks once again