limiting registration
-
Is there a way to limit registration to a set of email domains or automatically assign a role to user registered with a set of email domains ?
-
I'd probably use a transactional registration webhook for the first situation. This can return a non 2xx status if the domain is unacceptable and the registration won't complete.
For the second one, you could use a populate JWT lambda to add the role to the token if the user has the correct domain. If you need it persisted you could call FusionAuth APIs within the lambda (this functionality is limited to certain paid versions) or use a registration complete webhook to augment the roles (but this won't help with the initial registration, so should be combined with the lambda if used).
More here: https://fusionauth.io/docs/v1/tech/events-webhooks/ and https://fusionauth.io/docs/v1/tech/lambdas/