Live data from Hacker News

Ask HN: What is the norm for email validation?

news.ycombinator.com

11–18 of 18 posts

Re: Ask HN: What is the norm for email validation?

#11
post #2

What about passwordless, email-based login? It's easier than username/password login, it verifies the email address, and it provides the same level of security (assuming password can be reset via emailed link).

> it provides the same level of security

No, it absolutely doesn't.

If an attacker breaches a user's mailbox, and then uses a 'forgotten password' process to gain access to another system, the user will know about it - their existing long-lived session would be killed, and the password they remember/have saved will no longer work.

If the attacker simply uses the mailbox access to use & delete "login link" emails, they could make use of this to access the victims account for as long as they have access to the mailbox.

Re: Ask HN: What is the norm for email validation?

#14

If you're only worried about the domain aspect, and want a super simple approach just check if you can resolve the hostname.

I want to be checking for errors after the '@' symbol, such as @gmial.com or @gmail.con

Right so as I said, do a hostname lookup: if you get a result (ie not nxdomain) then it's ok, if not, it isn't registered, is a non existent tld, or has no records, all of which mean mail will fail.

Re: Ask HN: What is the norm for email validation?

#15
post #8

Send the user a verification mail.

We do that, but I don't want our server sending a verification email to "taylor@gmail.con", it should fix that on the input field.

.con might be a valid TLD though, there's so many TLDs now.

Just send a verification email...

Re: Ask HN: What is the norm for email validation?

#16
post #15

Earlier quoted context omitted.

We do that, but I don't want our server sending a verification email to "taylor@gmail.con", it should fix that on the input field.

.con might be a valid TLD though, there's so many TLDs now. Just send a verification email...

We do...but then people wait for a verification email that will never arrive (.con vs .com). Ideally, we want to fix this before they register their account. Looking for server-side (rails), service calls and client-side options.

Re: Ask HN: What is the norm for email validation?

#17
post #15

Earlier quoted context omitted.

.con might be a valid TLD though, there's so many TLDs now. Just send a verification email...

We do...but then people wait for a verification email that will never arrive (.con vs .com). Ideally, we want to fix this before they register their account. Looking for server-side (rails), service calls and client-side options.

I know Mandrill has webhooks that can notify you of events such as bounced emails.

https://mandrill.zendesk.com/hc/en-us/articles/205583217-Int...

Wouldn't integrating this help solve the issue, as you can possibly check if you received a bounce for that email shortly after the user attempts to register, and then notify them on the screen?

Re: Ask HN: What is the norm for email validation?

#18
You can, and should, knock out the really obvious stuff with regex validation but you're smart to be concerned about one thing that most people miss in this conversation.

A confirmation email doesn't solve the problem if the user mistyped the address to begin with. You're right, they wait for a confirmation email that never comes.

Using a third party service like BriteVerify's rest api is the only way to get an actual verification that the inbox exists.

Post reply on HN