How to use Actions to block signup based on email domain from a social connection?


I used a script in the PreUserRegistration Action flow to do the following: blocking signup from subsequent users from the same private email domain as an existing team.

The action worked quite well for Database connection signups.

I have just realised since testing then reading this post - that social connections do not run through the pre-user-registration action flow.


How can I build this feature (to block signup with certain conditions pertaining the email address )using actions if social connections (Google workspace accounts, for example) are skipped?

My first thought is that I’ll simply have to go back to using Rules which run every time and are quite robust.


Hi @jesse2,

Unfortunately the Pre User Registration Action can only be used with Database and Passwordless connections, as detailed here in our docs

You could still use Actions to block users from a social connection based on email domain but this would need to be built as a Post Login Action. So the user would first authenticate with the social provider but on returning to your application you can disallow access to your app. Here is an example of an action used to deny access based on email domain.
I hope this info help, thanks!

1 Like

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