Magic Link.
A magic link is a passwordless sign-in method: the person enters their email address and receives a single-use, short-lived link that signs them in directly when clicked. Control of the email inbox thus replaces the password.
Magic Link — Explained in Detail
With a magic link, after the email address is entered the server generates a random, hard-to-guess token, stores it with an expiry time and sends a link containing that token by email. When the person clicks the link, the server checks whether the token exists, is still valid and has not been used, and then starts a session. The token is then invalidated. There is no password, so it cannot be forgotten, reused or stolen in another service's data breach.
The advantage is simplicity for rarely used applications: anyone who logs in to a customer portal once a month to fetch an invoice has forgotten the password anyway and ends up at 'reset password', which in practice is also a link by email. The magic link turns that detour into the standard route. For security this means: the account is exactly as well protected as the email inbox.
Magic links have typical weaknesses. The link often opens in the wrong browser: the person starts signing in on the computer but reads the mail on the phone and is then signed in on the phone. Some email security systems automatically open links in incoming mail to check them, thereby consuming a single-use token before the human clicks. And a phishing email that looks like a sign-in email is hard to distinguish from the real one. These points can be mitigated but do not disappear entirely.
A common alternative is a one-time code by email: instead of a link the person receives a six-digit code, which they enter in the same browser window. Sign-in thus stays on the device where it began, and automatic link checks do not interfere. DLM Digital uses exactly this combination in its own customer portal: sign-in by email code plus passkeys, meaning Face ID or fingerprint on your own device. Passkeys are far more resistant to phishing than any method that runs through email.
What makes a magic link secure
The token must be generated with a cryptographically secure random generator and be long enough not to be guessed. It should be valid only briefly, typically a few minutes, and expire after first use. In the database it belongs only as a hash, so a database dump contains no valid sign-in links. Repeated requests for the same address should be limited so nobody can flood an inbox with sign-in emails.
Because mail scanners open links in advance, it makes sense for the link not to sign in immediately but to show a page with a 'Sign in now' button; only clicking that triggers sign-in. For accounts with higher protection needs, a magic link is not suitable as the only method. A second factor belongs there at the very least, see two-factor authentication.
Example: a landscaper's quote portal
An example: a landscaping company provides its customers with quotes, plans and photos in a small portal. Most customers visit it two or three times per project. Almost everyone would forget a password. So you sign in with the email address that is also on the quote and receive a sign-in link or code.
So that customers who start on the office PC and read the mail on their phone are not confused, the email additionally shows a code that can be entered on the PC. Those who use the portal often can set up a passkey after signing in. We plan sign-in options like these when we develop a web app or build an app for iPhone and Android.
Related Page
PasskeyFrequently Asked Questions About Magic Link
It removes typical password problems such as weak or reused passwords. In return security depends entirely on the email inbox, and phishing through fake sign-in emails remains possible. For accounts with high protection needs, passkeys or a second factor are the better choice.
A code entered in the same window keeps sign-in on the device where it started and is not consumed by mail scanners. A link is more convenient on a phone. Many applications therefore send both in the same email.
Briefly, typically a few minutes up to an hour at most, and for a single use only. A link that stays valid for days becomes a risk if the email is forwarded or an inbox is compromised later.
More Terms Starting with "M"
Meta Description
The meta description is an HTML tag that contains a brief summary of a webpage for search engines. I...
Mobile-First Index
Since 2019, Google primarily crawls and indexes the mobile version of a website (no longer the deskt...
Multimodal Search
Multimodal Search enables searching with different input formats simultaneously: text, image, voice,...
Ready for Your Project?
Apply this knowledge to your website — DLM Digital will help you.