News for hackers. Stuff that matters.
Re:Magic/tragic email links: don't make them the only option by mooreds on Tuesday January 07, 2025 @05:32PM (#42628484)
We went to a lot of trouble to make our magic link implementation work with anti-phishing software, corp link checkers and more. https://github.com/FusionAuth/fusionauth-issues/issues/629 documents some of the struggle.

I think that a link to a page where you enter a one time code gets around a lot of these issues.

Re:Magic/tragic email links: don't make them the only option by andrei_says_ on Tuesday January 07, 2025 @05:53PM (#42628683)
I arrived at the same conclusion after going through the steps and seeing that some corporate systems mark the login link as malicious, and there’s nothing I can do about it.

Sending a code goes around a lot of issues.

Re:Magic/tragic email links: don't make them the only option by js2 on Tuesday January 07, 2025 @09:24PM (#42630214)
Also: Safari can autofill codes from both email and text messages on macOS and iOS. It then automatically deletes the message too.

https://www.webnots.com/how-to-autofill-verification-codes-i...

Re:Magic/tragic email links: don't make them the only option by adastra22 on Wednesday January 08, 2025 @12:34AM (#42631275)
Why not just support a password?
Re:Magic/tragic email links: don't make them the only option by ThePowerOfFuet on Wednesday January 08, 2025 @03:11AM (#42632140)
Because ≈everyone reuses passwords and so accounts get taken over.
Re:Magic/tragic email links: don't make them the only option by sam_lowry_ on Wednesday January 08, 2025 @03:27AM (#42632210)
So what?
Re:Magic/tragic email links: don't make them the only option by victorbjorklund on Wednesday January 08, 2025 @03:58AM (#42632358)
1) It means your users will complain that their account was hacked (even if it was their fault) and might cancel their service

2) hackers can exploit your system which hurts you (you are a VPS provider and someone mines crypto and you have to wave it for PR) or you run an email service and someone uses your app to spam (which hurts your email rep) etc.

Re:Magic/tragic email links: don't make them the only option by adastra22 on Wednesday January 08, 2025 @05:37AM (#42632838)
A majority of internet users (>60% in 2024 and growing) use password managers and don’t reuse passwords.
Re:Magic/tragic email links: don't make them the only option by JW_00000 on Wednesday January 08, 2025 @07:44AM (#42633585)
Do you have a source for that number? 60% seems extremely high based on non-technies I know.
Re:Magic/tragic email links: don't make them the only option by mooreds on Wednesday January 08, 2025 @08:22AM (#42633918)
Agreed. I'd be thrilled if it were true, though! Because password reuse (esp without MFA) is a big problem.
Re:Magic/tragic email links: don't make them the only option by wccrawford on Wednesday January 08, 2025 @06:57AM (#42633280)
Re:Magic/tragic email links: don't make them the only option by ctxc on Wednesday January 08, 2025 @08:52AM (#42634194)
I'm surprised. >60% seems high even for tech literate software engineers!
Re:Magic/tragic email links: don't make them the only option by sebastiennight on Wednesday January 08, 2025 @09:45AM (#42634766)
This is an extraordinary claim on two counts:

1. Sixty percent seems astronomically high, do you have a source?

and

2. Most "normal" non-tech-savvy people I know who do use a password manager (which I've typically installed for them), are revealed a while later to still use a variation of password reuse : either storing the same password per category of websites, or having a password template they use on all sites, e.g. "IdenticalSecretWord_SiteName"

Re:Magic/tragic email links: don't make them the only option by lkbm on Wednesday January 08, 2025 @11:03AM (#42635564)
I don't have the source, but don't think 1Password/LastPass/KeePass. Think the "would you like to save this login" built in to Chrome, Firefox, Edge, Windows, and iOS. These days, you have to opt-out of password management.
Re:Magic/tragic email links: don't make them the only option by schnable on Wednesday January 08, 2025 @01:23PM (#42636951)
Right, use of a Password Manager does not imply they are using Password generation - it may just mean they click "Save this password" after logging in using a re-used password.
Re:Magic/tragic email links: don't make them the only option by dspillett on Wednesday January 08, 2025 @10:03AM (#42634956)
In my experience 60% seems too high even for supposedly technical users (ref: I work in a dev firm), at least away from their jobs.

I definitely don't believe it for the wiser population (my gut, again based on people I know, says the number is more like 10%, maybe 15). Even the 36% figure on the report on security.org posted above seems dubious, I suspect they have some bias in their survey. Unless that is some people who use the iCloud password manager for some things and no password manager for everything else, so it isn't claiming 36% routinely use a password manager away from a few key accounts.

Re:Magic/tragic email links: don't make them the only option by matt-p on Wednesday January 08, 2025 @04:39AM (#42632523)
Only having magic links gets you a load of stuff for free,

Higher level of security than just user+pass (w/ forgot password)

Email verification

Lifecycle management - in a SAAS when a user no longer has a corporate email, they can defacto not log in, wheras with a user+pass you need to remember to remove their account manually on each SAAS or have integration with your AD (for example)

Re:Magic/tragic email links: don't make them the only option by adastra22 on Wednesday January 08, 2025 @05:36AM (#42632832)
It’s not a higher level of security than password-based authentication. Why do you state that?

One-time email verification is not the same as security model as magic links. Magic links require instant access. Many security sensitive sites require a time delay and secondary notification for password reset links, which you can’t reasonably do for login links.

Lifecycle management is an interesting point. There are some underlying assumptions that might not hold though—losing an email doesn’t necessarily mean downstream accounts should be auto disabled too. Think Facebook and college emails, for example.

Re:Magic/tragic email links: don't make them the only option by mooreds on Wednesday January 08, 2025 @08:27AM (#42633956)
> It’s not a higher level of security than password-based authentication. Why do you state that?

It could be, depending on how the user has secured their email inbox access. I know I pay a lot more attention to my inbox than some random account. I don't have data, but I think this is true of most people.

I'm also more likely to enable MFA on my email account than I will on every random account I sign up for. And as far as the account providers, I trust the big email providers to be more secure than some random website with an unknown level of security.

You raise some valid points about tying access to a third party and what makes sense. It's not a simple issue.

Re:Magic/tragic email links: don't make them the only option by michaelt on Wednesday January 08, 2025 @12:10PM (#42636246)
> It’s not a higher level of security than password-based authentication. Why do you state that?

Personally I'm no fan of magic links.

But the people who do like magic links would say the typical 'forgot password' flow is to send a password reset magic link by e-mail. That means you've got all the security weaknesses of a magic link, and the added weaknesses of password reuse and weak passwords.

Of course you can certainly design a system where this isn't the case. Banks that send your password reset code by physical mail. Shopping websites where resetting your password deletes your stored credit card details. Things like that.

Re:Magic/tragic email links: don't make them the only option by matt-p on Wednesday January 08, 2025 @02:45PM (#42637732)
It's not about 'liking' magic links;

That means you've got all the security weaknesses of a magic link, and the added weaknesses of password reuse and weak passwords.

Is objectively true. I don't really 'like' magic links but I think they're a very easy to implement and simple to use for infrequently accessed systems. Arguably easier than user/pass and certainly more secure.

Re:Magic/tragic email links: don't make them the only option by adastra22 on Wednesday January 08, 2025 @04:58PM (#42638902)
Even with those assumptions (which I question), it is only a higher level of security if you assume that your users are reusing passwords, or using low entropy passwords. Neither would apply if they are using a password manager, which a growing majority of web users are.
Re:Magic/tragic email links: don't make them the only option by matt-p on Wednesday January 08, 2025 @02:58PM (#42637858)
That's a fair point, but does time delay or secondary notification (the latter could be done for magic links of course) really outweigh the practical security risk of password reuse, attacks, leaks etc? I would argue not, unless the user had a insecure email account for some reason.

Re Lifecycle management; Unless you're also linking a phone number or some other "factor" I think in a traditional user+pass scenario you're also SOL if you lose access to your $Email1 before you update your account to use $Email2, as changing your email to $Email2 would usually send a email to $Email1 to confirm the action. In that case you're in the same position as magic link login + email change functionality. Similarly Lifecycle management only comes for free if you don't implement email change functionality.

Re:Magic/tragic email links: don't make them the only option by nimish on Thursday January 09, 2025 @05:53PM (#42650684)
It's incredibly annoying to the user though
Re:Magic/tragic email links: don't make them the only option by davidmurdoch on Wednesday January 08, 2025 @07:05AM (#42633323)
One weird reason I've personal run into: when building on the edge, like with cloudflare workers, you can run into timeout issues because of how long password hashing takes.
Re:Magic/tragic email links: don't make them the only option by kentonv on Wednesday January 08, 2025 @09:06AM (#42634348)
That should be only if you're on the free plan that has a 10ms time limit. Paid plan gets 30 whole seconds which is plenty of time to hash lots of passwords.
Re:Magic/tragic email links: don't make them the only option by mooreds on Wednesday January 08, 2025 @08:22AM (#42633907)
Oh, we support passwords! (And passkeys, and social login, and OIDC, and SAML.)

Just want to make sure magic links work as well as they can.

Different folks have different requirements, and since we're a devtool, we try to meet folks where they are at.

We actually recently added a feature which lets you examine the results of a login, including how the user authenticated, and deny access if they didn't use an approved method.

Re:Magic/tragic email links: don't make them the only option by presentation on Wednesday January 08, 2025 @02:17AM (#42631861)
I've had success with sending a code, and the link takes you to a page where the input is pre-filled with the code, and you just have to click "Login".
Re:Magic/tragic email links: don't make them the only option by mooreds on Wednesday January 08, 2025 @08:24AM (#42633932)
Yup, that's a good option. Any kind of user action like a form submission is less likely to run afoul of a link checker.
Re:Magic/tragic email links: don't make them the only option by lelanthran on Wednesday January 08, 2025 @03:02AM (#42632092)
> I think that a link to a page where you enter a one time code gets around a lot of these issues.

I've done both in my SaaS product - link is GET with the OTP in the link, the target page checks if the link is in the URL, and if not, then the user can type it in.

Only for signup, though. For sign-in, the default is to always have the user type it in.

Re:Magic/tragic email links: don't make them the only option by hackernewds on Wednesday January 08, 2025 @03:42AM (#42632303)
one times codes are very vulnerable to phishing. users are prone to entering codes on any resembling website
Re:Magic/tragic email links: don't make them the only option by klabb3 on Wednesday January 08, 2025 @01:58PM (#42637293)
I was gonna argue that you can fix this but I realized that you’re right. It’s a MITM attack where there’s really no way to stop it, same as passwords. It’s basically the same feature (sign in in a different browser) that also lets attackers in.

That said, here’s how I would mitigate it:

- Like usual, time based limits on the code - Code is valid only for the initiating session, requiring the attacker to create a paper trail to phish

If you do have a magic link & want to use code as backup for authenticating a different device/browser, you could:

- Compare IP and/or session cookie between the initiating and confirming window. On match, offer login button. On mismatch, show the code and a warning stating how it’s different, eg ”You are signing in a different device or browser, initiated from $os $browser in $city, $country, $ip - $t minutes ago.”

It’s not perfect though and may still be prone to phishing.