Question about registering users with different roles

Got it. Here is how I would proceed:

  • Add an additionalSignupFields select option with coach and student:
    Lock Configuration Options

    • You can add this to your universal login lock config in the dashboard. Just add it to your custom login code.
  • You can then add the metadata to your id token via a custom claim in a rule. There is an example in this doc:
    OpenID Connect Scopes

  • Then all you will have to do is check for coach or student in the id token in your app.

You could use RBAC for this, and to do so you will have to take the metadata, then assign the user a role based on that info, kind of like this example:
http://community.auth0.com/t/how-do-i-add-a-default-role-to-a-new-user-on-first-login/25857/2

RBAC will provide a built in UI for managing roles, but is more intended to setting up permissions with an api. If that is something you are doing, then use RBAC, otherwise metadata will be a little lighter weight. Either one will work here.

Thanks,
Dan