DEV Community

As a backend developer, What should you do with users' gmail accounts that contains dots?

Zeyad Etman on October 21, 2019

Hi, If you have a gmail account, you can create multiple accounts using same email, just put dots between characters, But as a backend developer sh...
Collapse
 
moopet profile image
Ben Sinclair

Treat them as separate email addresses, because they are separate email addresses. What one email provider chooses to do with them is theirs and the user's business.

Collapse
 
jhilgeman profile image
Jonathan H

What Ben said. Trying to treat the situation differently will only create future problems and user confusion.

On a side note, you can also use the + trick with Gmail (e.g. johnsmith@gmail.com and johnsmith+devto@gmail.com go to the same mailbox). Other places allow the same thing but with dashes instead.

There are a lot of varieties - it's best not to try to manage them without a VERY good reason.

Collapse
 
dlukanin profile image
Dmitry Lukanin • Edited

Some validation/sanitization libs support gmail addresses and can treat them as one address.

For example:

test@gmail.com -> test@gmail.com
te.st@gmail.com -> test@gmail.com

For reference: npmjs.com/package/validator

Collapse
 
nathanburgess profile image
Nathan Burgess

You shouldn't do this for the simple fact that if a user has entered their email twice like this, then they're expecting them to behave like 2 separate addresses. It's just extra overhead on your platform.

Collapse
 
eaich profile image
Eddie

Wow. I've never thought of this. I have no solution but following to see what others say.