Auth0 Actions pre-registration

Hi everybody,

I want to set up a Pre-Registration Action which checks if the user is coming from an invitation into an organization or has been trying to sign up manually. If they were not invited, the registration should be denied.

In our setup we have organizations into which users can be invited. Personal sign-ups, without being in an organization, are not allowed.
I was able to hide the Sign-Up button in the New Universal Login flow by setting the button to an empty string so the user can’t click on it (hacky…). However, the button still exists so by going into the browser’s developer console they can find the button and get into the signup flow.

I know that it’s possible to disable individual users to sign up and only allow “Business Users” in the settings of an application in the Auth0 dashboard.
So when an individual user tries to sign up without being invited to an organization, Auth0 responds with an error BUT the user is still created which can be seen in the dashboard under User Management → Users.
That’s what we want to prevent.

To do so, I would like to check in the Pre-Registration Action was invited or if they tried to sign up arbitrarily.

It would be great to get some insights and tips on how to realize this.

Best regards,
Fabian

1 Like

Hey there!

As this topic is related to Actions and Rules & Hooks are being deprecated soon in favor of Actions, I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!

Learn more here!