DEV Community

Cover image for Passwordless authentication for your website in 5 minutes!

Passwordless authentication for your website in 5 minutes!

Arnaud Dagnelies on January 13, 2023

Passwordless authentication using your phone's fingerprint sensor, or face recognition using your webcam is now possible in the browser thanks to...
Collapse
Β 
nekio profile image
NEKIO πŸ’™ β€’ β€’ Edited

the problem i see with this when user will loose their device, whole account gets nuked and becomes inaccessible.

trust me they will loose the device, 9/10 times they will change phone in span of few months.

also users are stupid, they wont setup a recovery option on account creation, they just want to use the website.

so you have to force them to link like google account or Facebook or any major social media account on account creation as recovery options, there is no way around this.

Users just want to click a button and be done with it, thats the maximum effort they are willing to do.

This is not a bad idea, it just has flaws that need to be worked out.

Collapse
Β 
dagnelies profile image
Arnaud Dagnelies β€’ β€’ Edited

You very accurately pin-pointed a weakness of the current prototype. As it is now, losing your device means locking yourself out.

Instead of associating the account with Google, Facebook, etc, the roadmap planned has another approach based on three points.

  • the ability to register multiple devices (per link to send manually, per QR-Code to scan or per e-mail)
  • account recovery per e-mail or per SMS, if they are defined and allowed in the security settings
  • if only a single device is registered, and no recovery options are available, a warning should appear in the app to indicate the risk of account loss

I think these 3 aspects, hand in hand, would make it both convenient and safe, while leaving enough freedom to the user. At least, I hope so, even if it's a couple more clicks to secure an account.

It's true that Passwordless.ID is not yet ready for production. Nevertheless, I'm glad to have this sort of discussion as it is better to receive due critique than no interest at all.

Collapse
Β 
nekio profile image
NEKIO πŸ’™ β€’ β€’ Edited

most people do not know how to use a QR-Code, my mother doesn't even know what QR-Code is, she uses facebook, amazon, and google services, its a nice feature to have for younger generation, but no one will use it that is older.

your mentioning per email, its a nice feature to have, means you have to type your email, people are lazy, they wont do it unless its something they really want or need, if they have to type email out they already left your website and you lost a customer.

instead of typing your email you can click 2 buttons to link your google account, and it dose same thing.

so we are are right back to what I said about social media accounts.

I know your smart, but I work with older people, and they really have no clue how to use this stuff other then clicking buttons and maybe writing their email down

even thats difficult becouse most of the time they don't even remember what their email is unless they look it up on their device.

why do you think there is social account login on mostly every website?

So yeah, you need to make this as dumb as possible if you want to reach wide audience.

Thread Thread
Β 
dagnelies profile image
Arnaud Dagnelies β€’

Indeed, the simpler it is, the better. I've also considered a "link google/microsoft/... account" kind of button, it was just lower on the priority list than a plain link sent per e-mail which covers a broader use case for both recovery and registering another device. The QR code is just a bonus sine it is just another representation of the URL.

Also, users are diverse. Even if we want to cater for older people too, there is no reason to neglect the younger generation. After all, scanning a QR code to add a device is simply convinient.

I hope that all the "clueless people" you talk about have a little sense for security though. Otherwise, they will fall victim to phishing, social engineering, password reuse or other account tokeover attempts. Especially if they are lazy and did not register a phone number, they are vulnerable. So isn't it a good thing for "not technology affine" people to offer them secure accounts by default, at the price of having them add another device or register a phone number?

Lastly, regarding convinience, isn't it annoying to have to redifine your profile on every website you visit, and put in your address again if you buy something on a new website or travel somewhere. With passwordless.ID, you'd have a central place and websites just ask for your data instead of filling forms each time again.

So, yes for convinience, and yes for making it as simple as possible. I'm actually putting some efforts and thoughts into that, without sacrifying security either. The "link it to other accounts" also makes sense in the future, even if it's just to grab the email and some profile information.

Collapse
Β 
dagnelies profile image
Arnaud Dagnelies β€’ β€’ Edited

Well, the first step in multi-device is now available ;)

Image description

Image description

Dunno if it's very intuitive to find though.

Collapse
Β 
nekio profile image
NEKIO πŸ’™ β€’ β€’ Edited

i wouldn't worry about the looks, but functionality, looks can always be changed in shortest amount of time.
Its a good start for 1st pass :P

Collapse
Β 
raddevus profile image
raddevus β€’

This is absolutely great and a very good beginning to solving login problems.

I'm going to read over this again later, but this is great work and very creative way to solve this problem. Thanks for sharing. One of the best ideas I've stumbled upon in a long time.

Collapse
Β 
marcello_h profile image
Marcelloh β€’

When I log out and retry to login, I select my avatar ... then it throws an error.
I like the technique btw :-)

Collapse
Β 
dagnelies profile image
Arnaud Dagnelies β€’

Oh, that's interesting. Do you mind sharing the device / OS / browser you are using and the error it throws? That would be very helpful. I noticed Firefox is not yet properly supported yet for example.

Collapse
Β 
marcello_h profile image
Marcelloh β€’

OS : 13.1 (22C65) (Ventura 13.1)
Browser: Brave
Macbook Pro M1

Thread Thread
Β 
dagnelies profile image
Arnaud Dagnelies β€’

The biggest issue is that I have no Mac device right now at hand, so I cannot even investigte properly. I just verified that it works with Brave on Windows, so I wonder if the issue might be with the Brave / Mac OS combo or some other more generic Mac OS issue. You haven't told me the exact error either. The only thing I could do is open a ticket for now and investigate once I get my hands on a Mac.

Thread Thread
Β 
marcello_h profile image
Marcelloh β€’ β€’ Edited
ui.passwordless.id says

Error: failed operation: POST/auth/login - 500
 Error: Unexpected authenticator counter: 0 (should be >0)
Enter fullscreen mode Exit fullscreen mode

Perhaps you should log errors when they are shows like this, so you never have to ask ;-)

Thread Thread
Β 
dagnelies profile image
Arnaud Dagnelies β€’ β€’ Edited

That helps a lot. Apparently the combo MacOS/Brave does not behave strictly as the specification dictates. That's good to know. I'll add an exception for them until they fix their stuff I guess.

Regarding the logs, I agree. It's on the TODO list. Since it is not a single server but code distributed at many nodes running on-demand, it is slightly more tricky than just dumping it to a file. It's on the way though.

Thanks a lot for the report

Collapse
Β 
dagnelies profile image
Arnaud Dagnelies β€’

It's still slightly experimental, so if you encounter any issue or something is unclear in the tutorial, please tell me! Thanks.

Collapse
Β 
coderamrin profile image
Amrin β€’

sounds interesting, i'll try it soon.

Collapse
Β 
chipheadmike profile image
Michael Williams β€’

Great article. Loved the demo.

Collapse
Β 
dagnelies profile image
Arnaud Dagnelies β€’

Thanks, glad you liked it

Collapse
Β 
renancferro profile image
Renan Ferro β€’

Nice article dude!

Collapse
Β 
salvation_m profile image
Salvation Maduka β€’

This is dope

Collapse
Β 
michburkhalter profile image
michburkhalter β€’

Nice intro to your service. I'm still waiting for passwordless user authentication for my firebase project.
Webauthn could be such a game changer..

Collapse
Β 
dagnelies profile image
Arnaud Dagnelies β€’

Hi, I know it's a bit late and I'm not very familiar with Firebase authentication mechanisms, but can you use either a generic OpenID provider? In that case, pointing to api.passwordless.id should be enough, with your domain name as client_id and the implicit flow (the auth code flow is still on the TODO list).

Collapse
Β 
perchun profile image
Perchun Pak β€’

This also has own minuses, for example when you use PM (aka password manager), login with such method is just long. You can't do one click in PM, and all data will be filled in one second. This is especially awful if I'm not on the main device, where I am logged in everywhere, but I want to fast login, find some info, and delete all login credentials.

Such authentication, that was proposed here, must give an alternative - TOTP (aka 2FA). It is really fast to fill with password manager, and this is what I want to use on every website.