Esc
  • Jump to
  • The board
  • All launchesSort and filter by week or category
  • Open statsEvery number, in public
  • Maker storiesApps that stopped hiding
  • Submit a launch
  • AICategory
  • AnalyticsCategory
  • API & BackendCategory
  • Audio & VoiceCategory
  • AutomationCategory
  • CommunityCategory
↑↓ to move↵ to openPress / anywhere
Sign in

What is Magic Link Authentication?

A passwordless sign-in method that emails a user a short-lived, single-use URL containing a cryptographic token that logs them into your app when opened.

Updated · Building

Plain definition

Definition of Magic Link Authentication

A passwordless sign-in method that emails a user a short-lived, single-use URL containing a cryptographic token that logs them into your app when opened.

Formula / syntaxUser Submits Email -> Server Stores Hashed One-Time Token (10-15 min TTL) -> Email Link Clicked -> Session Cookie Issued

Worked example

Suppose a solo founder launches a made-up podcast show-notes tool called CastMemo at `https://app.castmemo.example`. To skip password resets and signup friction, CastMemo offers email magic links alongside OAuth sign-in. When a listener types `alex@studio.example` into `POST /auth/magic-link`, the backend generates 32 random bytes from a CSPRNG, stores only the SHA-256 hash of that token with a 15-minute expiration timestamp in the database, and emails `https://app.castmemo.example/auth/verify?token=...`.

Notice one subtle detail: corporate security gateways frequently pre-fetch every URL inside incoming emails to check for malware. If `GET /auth/verify` consumed the token on page load, the email scanner would burn Alex's single-use token before Alex ever clicked it. Instead, CastMemo renders a lightweight page with a 'Complete sign-in' button that submits a `POST` request to exchange the token for an `HttpOnly` session cookie and marks the token used atomically.

Why it matters when you launch

For an early v1, removing password creation eliminates credential-reuse risk on your database and cuts support tickets from forgotten passwords. Platforms like Supabase Auth and Auth0 provide passwordless email flows out of the box, enforcing one-time token consumption and allowlisted redirect URLs so attackers cannot hijack the post-login destination.

Still, magic links depend heavily on email deliverability and browser behavior. Auth0's docs warn that flows tied strictly to the initiating browser fail when iOS users request a link in Chrome and tap it in Mail, which opens Safari. Sending clean transactional emails from a verified domain and adding a 6-digit OTP fallback keeps mobile users from getting stranded.

Common mistakes

  • Consuming the single-use token automatically on a `GET` request, allowing corporate email link scanners to invalidate links before the user clicks.
  • Accepting an arbitrary `redirectTo` query parameter without an exact URL allowlist, turning your login link into an open-redirect phishing vector.
  • Setting token expiration windows to hours or days, or forgetting to invalidate a token immediately after its first successful redemption.
  • Failing to rate-limit the magic-link request route or provide a 6-digit email OTP alternative when users open links in a different mobile browser.

Tools and guides that use it

Official sources

Pritam Ghosh runs Hauntboard and maintains this glossary.

Published · Updated

Building something real? Launch it in public.

A person reviews every launch on Hauntboard, and every view and visit it sends your site is published on your launch page. Free to submit.

Launch free →

On the board

All →

Still hiding your app?

Put it on the board. Reviewed by a person, free to launch.

Launch free
Submit a launch