I’ve set up user registration and login with verification code on my site. I’ve noticed that I have some unwanted traffic (bots) trying to register, and while it’s not really an issue since you need a valid email address to receive the verification code and log in, the users are still being created and show up in the panel.
Is there a way to add an additional step of verifying the email address before the user account is actually created?
Checking the mx records doesn’t make sense for email addresses from large providers like gmail, yahoo, or throw away emails etc. because it only checks the MX records for the hosts, of course.
Also, invalid accounts might be created using existing email addresses.
But what you could do instead is the following:
When user enters the code and the code is valid, set a user field (verified: true) for example
Run a script via cron to delete all user accounts that have been created within a given timeframe and have not been verified
I think that’s a better approach than validating email addresses