Stop Gmail/Ms account with a certain domain from registering or logging in

I want to allow only a handful of domains to be able to register and login with gmail or MS.
I tried postLoginAction, it works but the user is still created in the users db in auth0 dashboard.

Hi @rezgui.aziz,

A post login action would be the correct way to limit theses social connections to specific domains.

The user is created in Auth0 and you could delete them using the Auth0 Management API v2.

Hope this helps!

Hey Dan, thanks for you answer, Can I integrate the Auth0 Management API v2 with actions, to have auto delete those accounts ? or do I have to do it manually?

Yes, you can use it directly in an Action.

This is perfect, thanks a lot!

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