DEV Community

Cover image for #DevDiscuss: Passwordless Authentication
Erin Bensinger for The DEV Team

Posted on • Edited on

#DevDiscuss: Passwordless Authentication

image created by Margaux Peltat for the Chilled Cow YouTube channel

Time for #DevDiscuss — right here on DEV 😎


Inspired by @dagnelies's Top 7 post, tonight’s topic is...passwordless authentication!

Questions:

  • Is passwordless authentication the future, a big mistake, or somewhere in between?
  • Have you implemented passwordless authentication in any of your applications? What tools did you use, and how did it work?
  • What pitfalls, traps, and flaws should devs be aware of when implementing passwordless auth?
  • Do you have any stories of passwordless triumphs and/or fails?

Oldest comments (33)

Collapse
 
tbroyer profile image
Thomas Broyer

Passkeys finally look like a usable and safe (by synching the passkeys between devices) way to do passwordless auth.

It's a bit too early for passkeys but at least applications could propose WebAuthn as a compliment to passwords for now.

Collapse
 
philnash profile image
Phil Nash

Passkeys absolutely are intended to be the winner here, and because passkeys are now possible in iOS and, I believe at least in Chrome Canary/Beta, I think that this is the time to start progressively enhancing registration/login flows to work alongside passwords for now and eventually replace them.

The syncing part of passkeys is cool, but we do need to get users used to it, as well as used to the QR code method of using a passkey across device when syncing isn't available. There might be some short term user experience degradation as people figure that out, but once we're over that passwords can be buried

Collapse
 
ben profile image
Ben Halpern The DEV Team

Is passwordless authentication the future, a big mistake, or somewhere in between?

I'd say very much yes that passwords probably are this really funny "early days of computers" thing that won't stick around usefully longterm.

The problem is that we are sort of in an extended hellish in between of all the different ways to authenticate, and we might be that way for a while.

I think the right authentication for the future has to be sort of an abstraction over all the different stuff that came before it, and I don't know if we're there yet.

Collapse
 
spo0q profile image
spO0q

Just discovered passwordless.dev/ recently acquired by Bitwarden.

Collapse
 
dagnelies profile image
Arnaud Dagnelies • Edited

Commercial providers are popping up more and more lately. They noticed too the breakthrough that WebAuthn provides and now race for market share and early adopters. Here are some: passageid, hanko, ownid, corbado, orysh, cisco... And bigger auth providers like auth0/okta, onelogin and others are stepping up too.

Nevertheless, as far as I know, Passwordless.ID is the only one which attempts to make a free public identity provider, which is crazy enough in itself.

Thread Thread
 
spo0q profile image
spO0q

Hum, makes sense. Thank you @dagnelies ! Was not aware of that. In any case, it's probably the sign of a deep-rooted trend.

Collapse
 
frankfriel profile image
Frank Friel

I'm amazed that we haven't come up with the ability for people to leverage blockchain for securing their online and digital identity. The blockchain could be leveraged for so many digital tasks it makes it the perfect solution. This would allow citizens to do things such as pay for services, vote, and communicate online securely and with validation and verification.

Collapse
 
miketalbot profile image
Mike Talbot ⭐ • Edited

It's an interesting idea but the blockchains are public normally and anonymous so not sure how you could record something in it that helped. I think this is one of blockchain's biggest problems as a payment gateway, wallets get identified and then you have a permanent record of all of your financial transactions available to anyone, avoiding that for passwords would be vital. Blockchain funds very much work on the principle of passwords (or keys) - "Your keys, your bitcoin, not your keys, not your bitcoin" is the problem with exchanges and hacks etc.

Collapse
 
koteisaev profile image
Kote Isaev - #StandWithUkraine

Why we need a blockchain if we can have a federated app based on standard tech? Like ActivityPub, Nodejs, Mongo or MariaDB, and some React/react-native UI? Why to blockchain? If it just will be some append-only database, deployed in federated per-server fashion?
In context of identity, such federated app en essence can be an analog of a federated keybase app, store public keys and signed (with related private keys) annotations/binding to keys. Without storing any private keys on servers.

Collapse
 
spo0q profile image
spO0q

I like to use public/private keys (e.g., ssh), which can be considered as a passwordless auth.

This one is easy to set.

Collapse
 
theaccordance profile image
Joe Mainwaring • Edited

Is passwordless authentication the future, a big mistake, or somewhere in between?

I'd say it's one-part marketing gimmick, and 2 parts evolving the consumer end of authentication to reflect the state of technology we have at our disposal.

Have you implemented passwordless authentication in any of your applications? What tools did you use, and how did it work?

This may sound arrogant or crass but I'm going to say yes as the concepts of Passwordless authentication aren't new. SAML for example will federate authentication without a password.

What pitfalls, traps, and flaws should devs be aware of when implementing passwordless auth?

Broadly speaking - be aware that Auth as a mature feature is not a small effort. Building your own user/password auth is a good exercise for learning, but not something you necessarily want to scale & maintain for the next 10 years. I avoid building my own auth these days, instead favoring third-parties like Auth0 or Okta.

Do you have any stories of passwordless triumphs and/or fails?

No stories, but I'll take the opportunity to give 1Password a shout out. They're an awesome product as a User for password management, and I'm loving their solution for managing and deploying secrets across my environments. The developer experience working with them has been awesome!

Collapse
 
thomasbnt profile image
Thomas Bnt • Edited

Is passwordless authentication the future, a big mistake, or somewhere in between?

For me, it's a good choice to avoid accounts hacked with a normal credential email + password. This is very simple and securised.
Got a private key like a SSH key, is just awesome ✨


I'm using some websites who using just email, and you do check your email to click on the link and validate is you. That is the one of better way to authentification! 🙌

Collapse
 
spo0q profile image
spO0q

it's called "magic links," and it's quite handy, but you have to be careful with the implementation. Otherwise, it can be vulnerable.

Collapse
 
thomasbnt profile image
Thomas Bnt

Oh thanks for telling me what it was called. I couldn't remember. 😆👍🏼
And yes, like all systems, we must be careful indeed

Thread Thread
 
spo0q profile image
spO0q • Edited

Indeed, but this one is quite critical. I was thinking as a dev who has to implement it. While there are some cons, you'd better use libraries in this case.

I've seen live projects where you can inject parameters in the URL, or with non-expiring tokens. These projects had memberships and payments associated.

Thread Thread
 
thomasbnt profile image
Thomas Bnt

Outch 🙁

Collapse
 
joelbonetr profile image
JoelBonetR 🥇 • Edited

That's an interesting topic, I'll stick around.

I want to apply passwordless into a project but further developments on other projects are consuming my time (and my soul 😂) so I don't think it will be till march when I'm able to start the given side-project, and the info shared here can be quite useful!

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
passagenick profile image
PassageNick

Not only is it seen as more secure and user-friendly, it _*is *_more secure and user friendly. ;-)

Collapse
 
ishafiul profile image
Safiul islam • Edited

I don't know if it is properly passwordless or not, but I implemented only OTP based authentication system. I was thinking about implementing 2-factor authentication with email/ phone. That time I realized if I need to secure passwords with 2-step verification then why do I need a password? there is no point in using the password. at the same time with OTP base authentication, I dont need to create any API route for resetting passwords also. here is my git: github.com/ishafiul/passwordless-auth

Collapse
 
dagnelies profile image
Arnaud Dagnelies • Edited

It's thrilling to see this discussion going on! If you ask me, passwordless authentication is certainly the future, without a doubt, as it is both way more secure and much more convenient for the user ...but there are hurdles and it's only half the story.

The hurdle is that the specification itself is very complex, making it challenging for developers and adoption slower. Moreover, it requires re-thinking authentication procedures since only registered devices can authenticate (*). Lastly, the user experience may vary depending on device/OS/browser and it is new and unfamiliar concept for users too. Nevertheless, I think it's just a question of time until it becomes the default login option for the MS, Google, Apple accounts.

This brings us to the second half of the story. In the long term, people would be annoyed to re-register their multiple devices for various websites, or call the account recovery procedure just because they bought a new phone. And that is what lead to the so-called "passkeys". (*) It is the same protocol, the same access keys, but they (MS, Google, Apple) will synchronize your keys accross all your devices. Sounds great, right, but also note that it is a weakening of the protocol since the keys are not so secret anymore.

Now, if you think even further ahead, I think it will lead to a kind of user aquisition war. I mean, you can either (passwordlessly) sign in accross all android devices or all windows devices or all apple devices, but not mix them, except if the website goes the extra mile to support it. Binding the user's access keys to the platform is kind of binding the user itself.

The only alternative to that is a platform neutral identity provider. That way, your credentials would not be bound to the platform and would be a central place to manage all allowed devices for all apps at once. I guess you see where I'm heading to, that's exactly what Passwordless.ID is meant to be.