I am using the Okta Sign-In Widget in an Angular application. I would like to assign users to a custom role during user self-registration. I have an app for an alumni website. The users can self-register. I want a new drop-down list that has: Student, Alumni. Based on selection, I need to assign the student role or alumni role. How can I do code this?
I am using Angular 11, Okta Sign-In Widget and Okta Developer Account.
I’m assuming you’re using the Self-Service Registration flow https://help.okta.com/en/prod/Content/Topics/users-groups-profiles/usgp-self-service.htm? If yes, you can add a custom attribute and define an enumerated list of values. Then you would add the attribute to the “Registration form fields” under the Self-Service Registration settings in your Okta org. The field should then appear as a dropdown when you click on “Sign Up” in the widget.