How Stop users accounts from being created in the database

I have a postLogin script for social logins, that will deny the access for users if their domain is not whitelisted, works fine, but The user account still get added the auth0 database.
what should I do??

Hi @rezgui.aziz,

Yes, that is by design. When a new user attempts to log in or sign up to your application using a Social connection for the first time, a social user profile is automatically created for them. This happens even if they are restricted from logging in due to a whitelist Post-Login action script.

If you want to limit access to your applications and prevent the user profiles from generating, I recommend using Database or Enterprise connections instead of Social connections.

Please let me know if you have any questions.

Thanks,
Rueben

Thanks, this will save me the headache of looking for a solution, by Database/Enterprise logins you mean with the email/password method, So I have to just get rid of social connections?

1 Like

Hi @rezgui.aziz,

Thank you for your reply.

Yes, by Database/Enterprise logins I am referring to an email and password method of logging in.

You can remove social connections if you are looking to prevent social connection users from creating a profile even though their domain is not whitelisted. However, even when these accounts are created, these social connection users cannot log in unless they meet the whitelisted domain requirement. Meaning that it has no impact on the function of your app.

Personally, I would suggest continuing to allow users to use social connections to log in and simply ignore those users who are not allowed to log in. It’s worth noting that users who do not log in at least once per calendar month, are not counted towards your MAU (monthly active users) count. Therefore, you can have these inactive users without affecting your 7500 MAU limit for the free subscription plan.

I hope the explanation was clear.

Thanks,
Rueben

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