4 ms·
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/f
by mooreds 2y ago
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 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.
- andrei_says_ 2y agoI 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.
- js2 2y agoAlso: 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-in-safari-from-email-and-messages/ https://www.webnots.com/how-to-autofill-verification-codes-i...
- deleted 2y ago[deleted]
- adastra22 2y agoWhy not just support a password?
- ThePowerOfFuet 2y agoBecause ≈everyone reuses passwords and so accounts get taken over.
- sam_lowry_ 2y agoSo what?
- victorbjorklund 2y ago1) 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.
- adastra22 2y agoA majority of internet users (>60% in 2024 and growing) use password managers and don’t reuse passwords.
- deleted 2y ago[deleted]
- wccrawford 2y agohttps://www.security.org/digital-safety/password-manager-annual-report/ https://www.security.org/digital-safety/password-manager-ann... 36%.
- JW_00000 2y agoDo you have a source for that number? 60% seems extremely high based on non-technies I know.
- mooreds 2y agoAgreed. I'd be thrilled if it were true, though! Because password reuse (esp without MFA) is a big problem.
- ctxc 2y agoI'm surprised. >60% seems high even for tech literate software engineers!
- sebastiennight 2y agoThis 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"
- lkbm 2y agoI 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.
- matt-p 2y agoOnly 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)
- nimish 2y agoIt's incredibly annoying to the user though
- adastra22 2y agoIt’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.
- mooreds 2y ago> 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.
- michaelt 2y ago> 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.
- davidmurdoch 2y agoOne 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.
- kentonv 2y agoThat 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.
- mooreds 2y agoOh, 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.
- presentation 2y agoI'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".
- mooreds 2y agoYup, that's a good option. Any kind of user action like a form submission is less likely to run afoul of a link checker.
- lelanthran 2y ago> 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.
- hackernewds 2y agoone times codes are very vulnerable to phishing. users are prone to entering codes on any resembling website
- klabb3 2y agoI 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.