Assigning dynamic role to the user on first signup

Hi @thanosdevelopers,

Welcome to the Community! I apologize for the delayed response.

You can accomplish this with a few tools.

  • First, customize the Classic Universal Login page to add an additional signup field, specifically a select field. This data will then be added to the user metadata. You can actually use this instead of a role. Roles are typically assigned by an admin and are used for access control.

  • If you do want to convert the metadata to a role, you can then use a rule that adds the role conditionally, similar to how it is done in this post, except you will have to look at the user_metadata to see what role to assign.

Hope this helps,
Dan