Which concept should i choose to create a sign up page authO universal with different value for an user and a teacher?

Hello !

I read about role management acces, RPAC, regarding the rules also but i could not find which is matching the best solution for my problem.

I will described my problem with details.

What i want is two create two button on my application
“Register as a user” and “Register as a teacher”.

My goal is :

  1. When i click on my application “Register as a user”, i want to send a parameter to the universal sign up page of auth0 with a param example ?role=user. I will at the pre registration page retrieve somehow the value “user” and show “Sign up as a user” (not if this is possible ? )
    Then during the post registration sighn up, i will assign to this user a role “user”, that i created in auth0 dashboard.

2)When i click on my application “Register as a teacher”, i want to send a parameter to the universal sign up page of auth0 with a param example ?role=teacher. I will at the pre registration page retrieve somehow the value “teacher” and show “Sign up as a teacher”.
Then during the post registration, i will assign to this user a role teacher, that i created in auth0 dashboard.

I read also other topics : Question about registering users with different roles this is similair but it’s not completely what i want to do.

Is there any way to achieve this goal please with auth0 ?, i am looking now for a while for some time on different solutions, but i am a little bit confused if i am on the good track or not, or if have to create several tenants, applications ?
Thanks for your help

Finally, i found a way to send parameters, i saw we can send parameters in the endpoint /authorize with the method loginwithRedirect().
And you you can retrieve this parameter on the new universal login, not the classic.
You have to go to authO dashboard > branding > universal login> select new > customize and then you can enable a toogle, where you can modify the javascript files.
There you can retrieve the parameters.

But my problem was mainly solve, because my business logic was changed, and i don’t need no more to have two roles, but if i have to, i think i will have to choose between the rules or the post registration actions. I don’t know which is the best way the rules or the actions.

1 Like

Thank you a lot for sharing it with the rest of community!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.