Verification Code, Confirmation Link or Magic Link: What's the Difference?
Verification Code, Confirmation Link or Magic Link: What's the Difference?
A confirmation link proves once that an address is yours. A verification code does the same, or adds a step at login. A magic link is the login: whoever opens it gets into the account.
The three side by side
| Confirmation link | Verification code | Magic link | |
|---|---|---|---|
| Looks like | "Confirm your email" button | 4 to 8 digits | "Sign in" button |
| Used when | Signing up | Signing up or logging in | Every login |
| If someone else gets it | They confirm your address | They may pass one step | They're in your account |
| Works on another device | Usually | Yes, you type it | Often only on the same one |
Which is safest?
All three depend on the inbox: if someone can read your mail, none of them protects you. That's why NIST, the US standards body, says in its guidelines that email "SHALL NOT be used" for out-of-band authentication, meaning as a way to log in. It treats a code or link that only confirms an email address as something different. So the warning applies to login codes and magic links, not to sign-up confirmations. For important accounts choose a passkey or an authenticator app.
Codes have one more weakness. A scammer can ask you to read one out, or show a fake page where you type it. No real company needs you to tell them a code.
Why they fail
"This link has expired"
Links and codes are short-lived on purpose. Ask for a new one and use it straight away.
"This link was already used"
Some mail filters open links to check them for malware, and that can use up a one-time link before you click. If it keeps happening, look for an option to receive a code instead.
"The code is wrong"
You probably have several. Only the newest is sure to work. Copy digits only, with no spaces.
"Open this on the same device"
Magic links are often tied to the browser that asked for them. Open the email on that device, or copy the link into that browser.
Nothing arrives
Check the spelling, then spam, then wait. On our own server half of all messages are stored in 0.59 seconds or less, so a long wait normally means the site hasn't sent it yet. More reasons: why a temporary email isn't receiving messages.
Which work with temp mail?
- Confirmation links and codes: yes, when the site accepts the address.
- Magic links: they can arrive, but don't rely on them. You need that inbox at every login, and ours deletes mail after 24 hours and has no password.
- SMS codes: no. Those go to a phone number.
For developers
- Offer a code next to the link, so a filter that opens links doesn't lock people out.
- Make links expire and work once.
- Don't log someone in when a link is merely fetched. Show a button first.
- Limit how often a code can be requested, and say so on the screen.
Our guide to testing sign-up and OTP flows covers how to check all of this.
Common questions
Is a magic link better than a password?
It removes weak and reused passwords, but makes your mailbox the only key. Protect that mailbox well.
Should I forward a verification email?
No. Whoever receives it can use it.