A Technical Deep Dive Into Email Based Authentication

A startup CTO sent me a Slack message last quarter at 2 a.m. Their auth provider had just disclosed that magic link tokens were guessable for a 14 hour window because a developer pushed a Math.random() based token generator to production. Roughly 4,200 sessions were potentially exposed. The fix took six minutes. The post-mortem took three weeks. The customer trust hit took longer.
That is the honest answer to "are magic links secure." They can be excellent. They can also be catastrophic. Everything depends on how the token is generated, how long it lives, how it is delivered, and what your code does when someone clicks the link a second time from a different device.
Related Articles


