DEV Community

loading...

Why I'm using Magic Link for my website login flow.

Hazmi Irfan
A developer that likes to build things. Currently working on https://www.logname.dev
・1 min read

Magic Link is a new upcoming authentication flow that allows user to login using only their email. It is kinda like Facebook login but with email instead.

You might have seen it when using Slack.

The flow is that you submit your email to the website and it will send a link to your email. Click on it and you are logged in. Just like magic!

I recently started a new project https://www.logname.dev and needed to decide on how I am going to let user register and login.

The easiest way is the normal email and password flow but as a user I hate remembering password for each website I visit.

Another way is using social login and that is by far the easiest method for the user because it only require 1 click.

However, after the recent fiasco from Facebook, as a user I am no longer comfortable on using social login anymore. Who knows what data they can get from it.

So to get the best of both world, I decide to use Magic Link. It is a lot easier than email/password flow and you don't rely on 3rd party service to do it. You also have the added benefit of verifying the user email as they need to use it to login.

The downside that I can see is that if your email fall under spam, your user might not be aware of it and may think that your login is broken.

In the next post I'm going to explain more technically on how to implement Magic Link.

Stay Tuned!

Discussion (0)