Back
Question
Asked

How do you verify email addresses for your project?



1) Verify that the user actually entered an email address?
In this case, use a regex script frontend (JS) and/or server side to validate the format of [email protected].

2) Verify that the email the user entered is actually his/her address? Send out a verification email with a once-off link to validate. Not sure what your stack is, but most frameworks have that built in as a start.

Alternatively if you're building a platform that requires login - use Magic Login so that users can only login with an email address, as this will give users a bit of an incentive to use real valid addresses - Same goes for paid subscriptions.

Thanks for the reply. I am using ReactJS for Frontend and NodeJS for backend. Verification email option seems good to me.

In addition to what @ronald93 says:

"Sign in with Twitter" provides you with a confirmed email address. I'm pretty sure that when a user has not confirmed their email address the Twitter OAuth flow won't provide the email. (I ran into a bug related to this, hence I looked into it).

The same is probably true for Facebook and many other OAuth services. Just make sure to double check they don't provide you with unconfirmed email addresses (i.e. create a test account to see what happens).

Another more novel, but not fool-proof way to verify an email address is to have the user send you an email. I one saw an "email sign up forms" that was just a mailto: link. When the user sends an email to that address he/she got subscribed to the newsletter. However, it's not fool-proof since it can be faked.