News for hackers. Stuff that matters.
Re:Magic/tragic email links: don't make them the only option by paxys on Tuesday January 07, 2025 @06:02PM (#42628761)
Save a browser cookie when the login is initiated. When the link is clicked check if the same cookie is present. If not, ignore it. Expire the link and the cookie after n minutes.
Re:Magic/tragic email links: don't make them the only option by Macha on Tuesday January 07, 2025 @06:40PM (#42629082)
Surely this breaks the "email is not on same device as login" use case? At least with normal magic links, they're merely incredibly annoying but doable (via e.g. typing in the URL)
Re:Magic/tragic email links: don't make them the only option by paxys on Tuesday January 07, 2025 @07:25PM (#42629457)
That use case still works. In fact it works better because if you click the link on your phone you don't automatically get logged in on your phone browser (or your email client's in-app browser). You can then copy the same link on your desktop and it will work as expected.
Re:Magic/tragic email links: don't make them the only option by apitman on Wednesday January 08, 2025 @01:24AM (#42631568)
I'm confused. How do you get the cookie from the original device to the other device?
Re:Magic/tragic email links: don't make them the only option by paxys on Wednesday January 08, 2025 @09:31AM (#42634628)
It's the other way around. You copy the URL to the device that has the cookie.
Re:Magic/tragic email links: don't make them the only option by apitman on Wednesday January 08, 2025 @12:02PM (#42636168)
How do you copy the link between devices? QR code?
Re:Magic/tragic email links: don't make them the only option by shakna on Tuesday January 07, 2025 @08:51PM (#42630057)
As long as you also have a code to enter, then things will feel fine across devices.
Re:Magic/tragic email links: don't make them the only option by michaelmior on Tuesday January 07, 2025 @06:27PM (#42628998)
After reading the other replies, this seems like one of the more effective approaches. Thanks!