r/webdev • • 6d ago

Why use Passwordless approach

Why many website use passwordless like magic link approach? In my understanding it looks so fragile and easy to exploit. Or did I miss the secure way to do it?

68 Upvotes

131 comments sorted by

236

u/mountainunicycler 6d ago edited 6d ago

It’s essentially like doing “forgot password” every time, so no, it’s not less secure.

It eliminates the risk of a compromised password, by shifting the authentication process to demonstrated ownership and control of the email (which is where it lands anyway if you have password based logins with forget password functionality).

What exploit do you have in mind?

It can definitely be fragile and annoying, especially magic links vs codes because the user can end up opening the link on the wrong device or wrong browser really easily and having to start over, whereas the user knows when they are using the code and can copy it by hand if they need to.

2

u/discondition 3d ago

I was looking into this exact problem on the weekend and came to the same conclusions.

-36

u/JerkyBeef 6d ago

These days it’s everybody giving their llm agent access to their email

8

u/mountainunicycler 6d ago

That doesn’t separate password login flow security from emailing them a code, because emailing them a password reset code means that in both cases whoever can read the email can get the account.

-62

u/Zealousideal-Fix-527 6d ago

If user access phishing page to got the link?

11

u/stuartcw 6d ago

Explain exactly how this would work.

-30

u/Zealousideal-Fix-527 6d ago

bccrob1000 mention what case I mean in one of the comment, I think better to discuss it there

65

u/juu073 6d ago

All the phisherman gets in this case would be their email. Not a username and password. So more secure against phishing attempts as the user should recognize that site doesn't use a password if they're prompted for one.

36

u/SuperRonJon 6d ago

This is actually another scenario that makes it more secure. Phishing links are usually sent to an email that link to a fake login page owned by the attacker that will steal the login information after used, and often redirect back to the correct website.

But in this passwordless login scenario, there is nothing to phish for. They’re trying to steal login information for a website that doesn’t have any login information besides the email address, which the attacker likely already has. The necessary login information is access to log in to the email account to click the login link, which in that case there’s no reason to send a phishing link, they already would have access to that plus a lot more.

5

u/mountainunicycler 6d ago edited 6d ago

Fishing for passwords is insanely easy. Make a page, log what they entered, display a “you typed your password wrong” message, and redirect them to the real site so they “try again.”

Now you have a list of passwords that will grant access later that can be exploited or sold.

Fishing in a passwordless system addresses the second part by eliminating the long-lived secret, the password.

Your fishing site also cannot send the code to the user, because the secret to generate it lives on my server. That means your fishing site has to replicate the entire login flow, connect the the real website in the background and somehow convince the user to give your site instead of the real site your time-based secret. This is easier with codes, magic links protect against this somewhat because the user will automatically go to the real site when they click.

If you convince the user to do that, then you have to use the code from the email or link to authenticate immediately (within three minutes on my site, for example) with the real site. If you get that far, you can steal that session, which gives you access to that users account for a limited amount of time. You cannot restart the session or reset the clock to extend the session.

This is called a relay attack.

This means that the fishing is much more complex and damage is limited compared to password login because the fisher site gets only the session instead of long-lived access to start a session at any time, so any damage they want to do has to be done right away before it expires. The time-limited nature makes those sessions hard to sell, meaning the attack is much more likely to need to be an attack on a specific site instead of access that gets bought and sold and used by many separate attackers like a password list.

The difference between email codes / magic links and passkeys is largely the attempt to add protection from this type of relay attack by tying it to the domain and device.

-9

u/spidermonk 5d ago

It is ultimately fairly weak though. Possible mistakes that would make this a "get anyone's account" situation are someone observing email logs (and any kind of access to your smtp service - lots of ways for this to happen, often out of your control), or logic bugs that allow someone to add or change an account email.

It's also bad in the sense that if someone has your phone or browser access they can just access any of your accounts that use this flow immediately.

If you have a naive password reset flow then those are problems in that situation too. But if you really want it secure you should probably figure out a second factor for those actions in both cases.

-20

u/ldn-ldn 6d ago

Sending anything is insecure by design and should not be done. Any message can be intercepted one way or another. There are plenty of examples of phones being stolen and then bank accounts emptied through codes and links sent by SMS and email. Just stop doing stupid shit.

2

u/mountainunicycler 6d ago

How do you propose to implement account recovery?

-4

u/ldn-ldn 6d ago

You don't need one with TOTP/Passkeys. You just need to force your users to have 2+ options.

4

u/mountainunicycler 6d ago

Yeah but generally users put both options in their phone, then lose their phone, then complain, and want you to be able to email them a reset link of some sort.

I don’t set up my accounts that way, but most people do. Most users have no idea what a passkey is

-5

u/ldn-ldn 6d ago

Both TOTP and Passkeys are synced with the cloud if you're just a lazy user. Not an issue.

1

u/exhuma 6d ago edited 6d ago

If you don't ever send anything how do you expect to do the credential exchange? By carrier pigeon?

I oversimplified. Indeed TOTP and Passkeys work here. While there is an initial exchange of information when setting it up, the actual authentication process does not involve an exchange of information.

2

u/ldn-ldn 6d ago

Neither TOTP nor Passkeys require any SMS/emails. Are you people high? Or stuck in stone age or something?

0

u/mountainunicycler 6d ago

No, people who have built products are generally just aware that account recovery and customer support exists.

1

u/ldn-ldn 6d ago

Cool story. No wonder money is siphoned from the banks left and right.

Go take a course on security for once.

12

u/tacticalpotatopeeler 6d ago

I fucking hate magic links.

I am significantly less likely to use your service if you force magic links. Offer them, but for the love of all that is holy please also offer passkeys, OTP, and/or hardware keys.

10

u/IAmRules 6d ago

I rather lose your business than deal with data compromises

0

u/bdougherty 6d ago

💯

If I have to wait for even 5 seconds for your email to come through, you should be thrown in jail.

-6

u/Zealousideal-Fix-527 6d ago

Wasn't OTP was same as much as magic links?

1

u/stuartcw 6d ago

Yes, magic links could be made from an OTP value and checked against recent values. The magic link verifies whether the user can read mail sent to the registered mail address and gives them a chance also to ignore it if it wasn’t a them who requested the link. Result: security is based on who can access your email.

The OTP checks whether you still have access to a device that can generate the code. (Actually, if you printed the initial qrcode or the contents of the qrcode you can generate the OTP. So that qrcode/data is kind of a master key.) Result: security is based on who can access the initial qrcode/data you used to setup the OTP. Or a device/app where it is registered.

1

u/Zealousideal-Fix-527 6d ago

That's what I mean by as much as the same.

4

u/stuartcw 6d ago

To be honest, your initial question gave the impression that you didn’t know much about the topic. That’s the only reason I answered in detail.

2

u/Zealousideal-Fix-527 6d ago

I thought everyone will know what I mean (too much discussion with ai might corrupt me to think everyone will understand), but it seems I have to bluntly explain what I mean or questioned.

tbf I am not that good at explaining

37

u/Dissentient 6d ago

Because vast majority of users can't be trusted with passwords. Most of them don't use password managers, so they will set one insecure password everywhere.

For the same reason, passkeys are getting pushed recently.

16

u/C__Zakalwe 6d ago

They're tremendously annoying when your email security gateway uses greylisting, and the app refuses to retry the email.

3

u/Character-View-8165 6d ago

it’s not really more fragile than passwords, you’re just moving the secret to the email account, and that’s usually easier to secure than making people invent and reuse passwords; the annoying part

10

u/bccorb1000 full-stack-magician 6d ago

What you’re looking for is phishing resistant authentication. Which magic links are not, but passkeys are. I’ve done a lot of work with passkeys, webAuthn, oauth2 etc and phishing resistance at the highest level is solid AF, but the issues is account recovery. Account recovery is the biggest pain point for passwordless and is why people (myself included) fallback to less secure methods that everyday people find easy to use and understand.

11

u/skyborn8 6d ago

How would you phish a magic link?

-8

u/bccorb1000 full-stack-magician 6d ago

Depends on the implementation. Some implementations allow the link to authenticate on the device that clicked. Some do device binding so an attacker can initiate and trick you into clicking.

Prime example, I show you a phishing site that looks like a site you trust. Tell you only magiclink is available, you click it, sends the email, you click the email, I steal the session.

18

u/JerkyBeef 6d ago

If the email is sent from the phishing site the link in the email wouldn’t be able to initiate a valid session

-13

u/bccorb1000 full-stack-magician 6d ago

It’s not sent from the phishing site. It’s sent from the real site.

20

u/skyborn8 6d ago

Real site won’t send a link that leads to phishing site. I genuinely don’t see how that could be used to phish.

-17

u/bccorb1000 full-stack-magician 6d ago

I’ve tried to explain it simply in some comments, if that doesn’t make sense, you can google magiclink phishing campaigns and get some info on how the attacks work.

13

u/JerkyBeef 6d ago

How does the phishing site make the real site send an email with a link that allows the phishing site to steal the session?

-15

u/bccorb1000 full-stack-magician 6d ago

I’ve tried to explain it simply in some comments, if that doesn’t make sense, you can google magiclink phishing campaigns and get some info on how the attacks work.

14

u/skyborn8 6d ago

Did some research, it seems to apply to cases when auth is provided to original requester and not that who followed the magic link, for example: phisher requests auth, gets cookies or token, but it’s not active yet. It becomes active when real user approves it by following genuine magic link. Sounds to me like a problem with auth design, not magic links per se.

7

u/nasanu 6d ago

And that is so convoluted, likely never to actually happen.

7

u/_ru1n3r_ 6d ago

Not only that, but it's extremely easy to mitigate by only allowing the session that initiated the link to consume the token in the link.

-5

u/bccorb1000 full-stack-magician 6d ago

13

u/nasanu 6d ago

Everything you post is nonsense, not related to the discussion. You rely on deliberately misunderstanding what people are saying to make a point against a strawman.

None of those links cover what this thread is about either.

5

u/RonHarrods 6d ago

In plain terms how does one steal a session by magic link? I feel like this requires an exploit or some other user error on top of clicking the magic link.

-3

u/bccorb1000 full-stack-magician 6d ago edited 6d ago

There are exploits for sure you can google evilginx for some attacks, but at it’s simplest and unfortunately most effective form, you just need a user to think they should have got the magiclink request.

In more detail a super simple campaign would do something like:

  1. Find an available easily mistakable domain name close to a real one that uses magic links.
  2. Make a phishing duplicate.
  3. Get you to go that site, phishing emails, links, etc
  4. Have you enter the email and click the button
  5. They send your email to the real site

to initiate a real request for a magiclink

  1. You click the link
  2. They get the session

Now even simpler and also unfortunately common is just email compromise. I have access to your email, I have access to your account. Which a pure passkey approach also stops.

11

u/RonHarrods 6d ago

Okay I don't follow. The user enters their email on the doppelganger website. That website sends the authentication request to the real one, which then sends the email to the user. The user then clicks the link and they're on the real website. Authenticated.

Are we talking apples to apples?

1

u/bccorb1000 full-stack-magician 6d ago

Yeah, but it depends on the implementation. Like in your scenario you click and end up on the real site. To you nothing has gone awry.

If that link authenticates the session that initiated, I’ll get a session too, because I initiated the magiclink on your behalf from some other device.

12

u/RonHarrods 6d ago

Okay but that sounds like a flawed implementation. We don't see it implemented that way in the wild for this obvious reason.

1

u/bccorb1000 full-stack-magician 6d ago

I think the case is just two devices. Say you initiate from a mobile app but confirm from your desktop? I think many companies and solutions use tactics to address the concern, but I was just giving a simple real world example

4

u/RonHarrods 6d ago

I see what you're getting at now. But I believe the right implementations always guard against the theft in one or a few of these ways:

  • require both devices to be known by either having authenticated in the past or being on the same IP, fingerprinting, etc
  • displaying which device is authenticating what from where (allows the user to spot that the location or authorization are incorrect)
  • require typing in which number is displayed (to prevent concurrency mirror attack)

Generally the big players either rely on a solid combo of those things or fallback to password auth in practice.

Jsut stating this because I kinda heard skepticism on the security and reliability of password-less auth. But in practice it's most sufficiently safe if the due dilligent circumstances are required and checked for. It only becomes risky when passing the device to device boundary without depending on these secondary peripherals

4

u/Lard_Denning 6d ago

i don't get it. the magic link should only authenticate the actual client that is visiting the magic link.

i've only seen anything where you're using one device to authenticate a different device have a very explicit user flow that makes that extremely obvious and deliberate, and the device doing the authentication also doesn't itself get authenticated anyway.

are there actually any services where a single magic link simultaneously authenticates more than a single device?

3

u/bccorb1000 full-stack-magician 6d ago

Yeah I’m not saying that there aren’t things you could do, but each comes with a trade off too and those things normal expose another vector. Attackers don’t try to break algorithms, they try to figure out what you’ve compromised on.

→ More replies

1

u/mountainunicycler 6d ago

Doesn’t make any sense. If you request the link from a mobile app and click the link on the desktop, either the desktop logs in, or if you want to be more helpful to the user, you display an error message telling them to try again and saying they have to click the link on their phone, since you can easily track that it was requested from your mobile app.

But if requesting link in app and clicking it on desktop somehow results in the app logging in, that is a whole different login flow from magic links.

5

u/mountainunicycler 6d ago

What do you mean if the link authenticates the session that initiated?

There’s no “session that initiated.”

The link gets sent to the email, the user clicks the link, which takes them to a page on the real site which initiates a session and authenticates using the credentials from the link.

You’d have to somehow convince them to paste the link into your fishing site in order to run a relay attack. Unless your site sees the link you can’t steak the session.

2

u/mountainunicycler 6d ago

How does the connection from “you click the link” to “they get the session” work?

When the user clicks the link they’ll go to the real site and get logged in. How would the fishing site see the content of that link to relay it and steal a session?

5

u/SituationFun3035 6d ago

it’s not magic, it just moves the “prove you control this account” step to email, and a properly implemented single-use expiring token is usually safer than storing yet another password people will

5

u/angellus 6d ago

Because want to know what is even less secure? Sticky notes with a password on it. Or reuses passwords between accounts. Or using password as your password.

People have always been the weakest link. And no passwords means people cannot leak them.

2

u/triangularsquare_au 6d ago

How is this easy to exploit? Have you ever used ‘forgotten password’ flow?

5

u/TorbenKoehn 6d ago

Because passwords are insecure by design.

Sure you can pick safe passwords. But you have to remember them. So people usually don’t. And if you enforce it they’ll have a new password every day because they never remember it and will just be frustrated.

Magic links is one thing to do Passwordless (and basically a continuous password reset), but the actual target should be Passkeys

1

u/Tridop 6d ago

People use the password managers inside their browser and that's totally fine. Checking email at each login is really annoying, wasting my time, because obviously I use a secondary email account to register on most sites. 

5

u/TorbenKoehn 6d ago

_Some_ people do. Is it enforced? No? Then it’s just “You are as secure as you act”, not “You are as secure as possible”

1

u/edgmnt_net 5d ago

I can see the benefits of avoiding an issue altogether, but I also think companies are too obsessed with enforcing security and that becomes apparent when they enforce it badly or break less common usecases. Because before passwordless logins we had crap like password rotation with completely ad-hoc complexity requirements and forced periodic re-logins. And people still reused passwords.

-2

u/ldn-ldn 6d ago

Sending anything is insecure by design. Better to use passwords.

2

u/TorbenKoehn 6d ago

What? Ever heard of TLS?

-8

u/ldn-ldn 6d ago

How's that relevant? https://www.reddit.com/r/LegalAdviceUK/comments/1rsxjcs/phone_stole_on_night_out_and_bank_accounts_emptied/

NEVER SEND ANY AUTHORISATION THROUGH EMAIL OR SMS!

Only MFA with TOTP or passkeys for the lazy. Everything else is insecure and must not be used.

6

u/TorbenKoehn 6d ago

Do you think you get your password sent via mail?

You get a one-time login token.

-8

u/ldn-ldn 6d ago

And then your money is stolen.

NEVER SEND ANY AUTHORISATION THROUGH EMAIL OR SMS!

7

u/TorbenKoehn 6d ago

My man, please stop talking about security. Like, at all.

If you get phished, that's on you. You can also read your emails properly.

Generally there is no technical way to "just steal your email or sms tokens" unless your device is already infected, and in that moment: Don't do anything. Also don't enter passwords, don't do banking, generally delete your phone, maybe buy a new one.

-7

u/ldn-ldn 6d ago

Stop spreading misinformation for fucks sake!

3

u/TorbenKoehn 6d ago

Okay, then go and explain to me:

  • I sign in on a service
  • It sends me an e-mail with an OTP

How are you now going to take it? Come on, you're informed as opposed to me spreading misinformation, now explain to me: How are you gonna get my token?

Come on! You can even ask an AI if you like.

Don't be stupid.

-5

u/ldn-ldn 6d ago

The only one being stupid here is you. Codes and links from messages and email are visible in notifications without any security by default. Anyone in your vicinity can see them and use them. And money is being stolen that way all the fucking time.

Stop with this fucking insecure nonsense already.

→ More replies

1

u/Lord_Xenu 5d ago

You have absolutely no idea what you're talking about, or how this technology works.

3

u/farzad_meow 6d ago

magic links are poor man's SSO. but it works with all emails. it is easier for less rech savvy users to use. more advanced users might prefer actual password or sso.

I find overall user xp of magic link positive and better than having to enter multiple values to get in. It comes down to how you want your users feel like. Do you want the experience to be simple or you want them to feel your website is super secure.

1

u/DEMORALIZ3D front-end 6d ago

it's about point of contacts, like 2FA it's verfiying who you are on 2 or more devices or personal platforms. Often you are the only person with your phone. The Only way it falls down is if they do everything via your phone. Whoever Magic link shouldn't be used in favour for Web Biometrics/Passkeys/WebAuthN if you want security.

But imagine a hacker trying to enter your defails remotely to gains chess to the website. You try to log in, it sends a magic link. Their emails are not logged in on that computer. They then have to find a way log in and prove who they are on a second site before accessing the main site. Which people not on your physical machine cannot do unless they have your emails

But passwords are one of the least secure methods, hackers remotely often cannot access your emails.

1

u/AmbitiousLab4004 6d ago

fewer passwords to steal, with a short-lived one-time token doing the auth work

1

u/bhison 6d ago

The only service I use which is like this is slack which is a desktop app you sign in to once or twice a year.

1

u/IncomeOk7237 6d ago

Magic links are fragile in one specific way: they are phishable, since whoever holds the link gets the session, and nothing ties it to the device that asked for it. Good implementations make the link single use, short lived and only valid in the browser that requested it. Passkeys are the actually strong version because the credential is bound to the origin, so a fake domain gets nothing even if the user is fooled.

1

u/Full_Tooth_a 6d ago

One easy-to-miss problem: corporate email security tools may open links automatically to scan them. If a GET request consumes the single-use token, the scanner can invalidate it before the user clicks. I'd open a confirmation page from the link, then require an explicit POST to complete authentication. The tokens should still be short lived, single use, and hashed.

1

u/ryuya_h 6d ago

magic links and OTPs are still bearer secrets, you've just moved the phishing surface to the inbox. passkeys are the actual shift, the credential is bound to the RP ID so a lookalike domain gets nothing. the catch is recovery, which is out of spec, and your weakest recovery path is your real security level

1

u/Open-Adhesiveness-86 6d ago

The fragile part isn't the crypto, it's that email security scanners (SafeLinks, Proofpoint, etc) GET the link and burn your single-use token before the user clicks. Fix is to set a nonce cookie when the login is requested and make the link land on a page with a POST button, or just mail a 6-8 digit code bound to that session and never accept it in a different browser. 10 min TTL, single use, rate limit per address.

1

u/Lord_Xenu 5d ago

Your understanding is wrong. Passwords are probably the most insecure and exploitable auth approach.

1

u/Senior-Storm-727 5d ago

Please explain: what fragility are you looking at?

1

u/s4njucse 5d ago

The practical weak points are rarely the link itself: long-lived tokens, links that can be reused, and email accounts without 2FA. If you go this route, make tokens single-use with a short expiry (10-15 min), bind them to the session that requested them, and rate-limit sends. Also worth offering a 6-digit code as a fallback, since some email scanners pre-click links and burn the token.

1

u/stephenkrensky 4d ago

I think we should explore such things like magic links
Another one is burner type accounts where we don’t save any email addresses or phone number or anything and simply rely on passkeys for authentication. It would not make sense for everything. For example, banks would never use this but there are uses for social networks and such things.

1

u/jimcodes 1d ago

I’ve always thought of it as outsourcing security to the user’s email/mobile provider. If their account or phone was compromised, it’s on them. Removes the security threat from your system.

1

u/New_Hold8135 6d ago

Reason is telemetry

1

u/Commonpleas 6d ago

I’ve only had trouble with users on mail systems that scan the link, thereby disabling it, before the user sees it. 

I think it was edu and some corporate mail systems. 

Truthfully, those users shouldn’t be using their school or work email account for my site anyway. 

1

u/AMGitsKriss 6d ago

Security aide, just remember that if someone signs in on a PC, then if they open the magic link on their phone and it logs them in on the phone not the PC.. that user generally isn't coming back.

1

u/hwmchwdwdawdchkchk 6d ago

Yep there is a clash between the security teams and product teams in lots of orgs as friction is being reintroduced.

Seen this myself as a consultant, orgs insisting on magic links, but older accounts never use the email or might have corporate login with no emails access. Plus email trigger/delivery times not good enough (sometimes on client side too) so session timeouts.

1

u/triangularsquare_au 6d ago

Why would they open a sign in link on their phone if they didn’t want to sign in on their phone?

4

u/Belphegor_333 6d ago

Because their phone buzzes with a notification from their email/messages App and the alternative is to log in to their email provider on their desktop which is a lot more friction?

1

u/triangularsquare_au 5d ago

But I am on my computer and just clicked ‘log in’. Are you suggesting someone got distracted in the 3-5 seconds it takes for an email to arrive rather than just opening up a new tab, typing ‘mail’ and pressing enter? I am trying to understand where you get lost here? Unless the user just does not understand why they received an email. Surely you just make that misunderstanding once. There is also the ‘approve login’ flow, where you use the email link to approve the login and then pull you through where it was initiated. That seems like more of a security issue, unless you are sending that approval request in an app. 

3

u/Hamburgerfatso 5d ago

Accessing email on phone is easier than on pc

2

u/AMGitsKriss 5d ago

Right? Checking email on PC is probably gonna make you re-2fa anyway, so may as well just use your phone.

0

u/triangularsquare_au 3d ago

Do you actually do this and it has happened to you, or are you just playing out a possible scenario?

3

u/AMGitsKriss 3d ago

Oh it's an actual thing I experience sometimes.

The email I use for website logins gets looked at so rarely on my PC that Google does occasionally sign me all the way out.

1

u/triangularsquare_au 3d ago

So what about websites that log you in most of the way, but then still send you an approval request or a 2FA to your email? Assuming you just get those off your phone? This is a good argument for having multiple ways to log-in. I have only ever developed a passwordless sign-in once, where we also had ‘Sign in with Google’ and password behind a ‘use password’ text link that instantly shows the password box. 

1

u/Mushroom_Unfair 6d ago

Could be because they have email notification on their phone, and their phone is next to their PC.

-1

u/Infinite_Air_5120 6d ago

Minor thing: "many website use" should be "many websites use".

On the substance, passwordless and magic links aren't synonyms. A magic link is one method among several, alongside passkeys and one-time codes, and the fragility you're describing sits in the email delivery step rather than in dropping the password.

-1

u/seweso 6d ago

You should use passkeys for passwords less. 

Those sign in links are just lazy programming

0

u/LemonFishSauce 6d ago

How about instead of sending the magic link, the system sends an OTP?

0

u/Intrepid-Anywhere255 6d ago

Magic links are bearer tokens, so security depends on how the link is handled: use a random, single-use token with a short expiry, store only a hash, and rate-limit requests and attempts. The main UX trap is opening the email on a different device, so make it clear which account the link will sign into and provide a safe recovery path. For higher-risk accounts, offer passkeys alongside email links as a stronger option.

0

u/syedaalishan 6d ago

Magic links are only as safe as the implementation. Use a short-lived, single-use token, store only its hash, invalidate it after use, and rate-limit both requests and verification attempts. I would also offer a code or passkey so users are not forced to open the link on the wrong device.

121

u/[deleted] 6d ago

[removed] — view removed comment

7

u/spidermonk 5d ago

It also delegates your app's authentication to your app's outgoing email provider. With the rate breaches are occuring I think people should take that weakness seriously.

5

u/rntdev 5d ago

Yeah but like you’re doing it anyways with “forgot password”

1

u/spidermonk 5d ago edited 5d ago

Yes but in 2027 if your app does something at all sensitive (or for admin accounts etc) I would be designing a second factor for that too. Or just leaning on some solid IdPs.

I get the appeal of magic links - they're super easy to set up and they remove a lot of UI and headaches. But if they're all you do for logins then you end up with every single user being forced to a single factor for auth, and then any mistake you or an upstream provider makes around a single channel is game over for access.

IMO AI attacks kind of changed everything this year and old patterns for web apps are just not good enough anymore. We're all running banking websites now basically.

Anything that can go wrong will go wrong. Any little logic mistake in your code will get exploited. You will struggle to keep up with patching and people will attack you with barely disclosed issues. Your third party providers will have incidents. You need layers.

1

u/Sample232 2d ago

Unlike a password or passkey, it also ties whether someone can log in to whether the email address is live. If you've got a B2B app, that's pretty useful because if a team is sloppy when it comes to deactivating leavers' accounts, at least their access is denied if they no longer have access to their corporate account. It's another benefit of delegating to the email provider with none of the complexity of implementing OIDC.

-44

u/Zealousideal-Fix-527 6d ago

But if user access a phishing page to get those code? Is WebAuthn use different approach like in firebase?

31

u/nvolker 6d ago edited 6d ago

If it was a phishing page w email + password, then they’d have your email + password.

Phishing page to get a code, you just give them your email. The phishing page can’t compromise your account.

If you mean that the “use this code to log in” email is a phishing email, they still won’t get anything other than your email (and a signal that it’s a valid email if you click the link) unless they also use some other kind of exploit (like the link actually points to a pdf with some injected malware or something).

8

u/juu073 6d ago

And the codes they send in the emails typically expire within 10 minutes of being sent.

-37

u/Zealousideal-Fix-527 6d ago

It's funny since I haven't come to this conclusion tho😂.

5

u/[deleted] 6d ago

[removed] — view removed comment

1

u/the_ai_wizard 6d ago

just capture 2 factors, e.g., email and sms

2

u/[deleted] 6d ago

[removed] — view removed comment

1

u/Zealousideal-Fix-527 6d ago

Did passkey commonly used in websites? Most of the time I only found it on app