Delete this address?

This address and its inbox will be released and you will get a new address. You can only return to the old one with its recovery key.

How do email verification links work? Tokens, expiry and security

You sign up for an app, a "verify your account" email arrives, but at that moment you're busy with something else on your phone. That evening you sit down at your computer, click the link and are told "This link is invalid or has expired." The email is still there, the link is the same link. So what changed?

What changed is the lifetime of a small key behind the link. Verification links look like ordinary web addresses, but they carry a value created to be used once, for a limited time. In this article we explain how that mechanism works, why it sometimes breaks unexpectedly, and what can happen if the link falls into the wrong hands.

What's inside a verification link?

A typical verification link looks roughly like this:

https://exampleapp.com/account/verify?token=Xq81kd...Lp2w

The first part is an ordinary page address. The real work happens in that long, meaningless-looking string at the end. It's called a token, a value the site generated just for you, long and random enough to be practically impossible to guess. The token works as proof that "the person clicking this link is someone who can read the mail sent to this address."

Note that the link doesn't (and shouldn't) contain your password or your email address. In a well-designed system, the token carries no personal information on its own; it only means something because of the record it matches in the site's database.

What happens behind the scenes, step by step?

  1. You submit the sign-up form. The site creates your account as "unverified".
  2. The site generates a token. A sufficiently long value is created with a secure random number generator.
  3. The token is stored. The site saves this value (in good implementations, as a hash rather than the raw value), linked to your account and an expiry time.
  4. The email is sent. The token is placed inside the link and sent to the address you entered.
  5. You click the link. The site takes the incoming token and looks it up in its records.
  6. Three checks are made. Does this token exist? Has it expired? Has it already been used?
  7. If everything checks out, your account is marked as "verified" and the token is invalidated.

The "invalid" message you got that evening means one of the checks in step 6 failed. Most likely the link had expired, or it had somehow already been used.

Why is there a time limit?

A verification link is a door to control of an account. The longer the door stays open, the greater the chance that someone gets hold of that email and walks through. If a link sent months ago and forgotten in an old mailbox still works, anyone who later gets into that mailbox can use it.

The time varies by site. Account verification links tend to last longer; password reset links are kept shorter, because they're far more dangerous in the wrong hands. There's no single standard duration; each site sets it based on its own risk assessment.

Why single-use?

Same logic. If the link still works after it has done its job, it keeps sitting in your mailbox like a key. Being single-use means the door shuts the moment the action is complete. Some sites also cancel the old link when you request a new one, so if you pressed "Resend" twice, the link in the first email may no longer work. Always use the most recent email.

I didn't click the link, but it says "already used"

Surprising, but real. Some email security systems, especially ones used at workplaces, automatically open the links in incoming emails to check whether they're harmful. If the link is single-use and the site counts a single page visit as "verification", the security scanner has used up the link for you.

That's why well-designed sites don't act the moment the link is opened. They first show a button such as "Verify my account" and only complete verification when it's pressed. If you run a site and get "the link doesn't work" complaints from people with work addresses, this may be the first place to look. We've collected other problems with delivering verification emails in why verification emails land in spam.

What happens if someone else gets the link?

Since all the token's power rests on the assumption "whoever can reach this email is the owner", the email going to someone else is a direct risk. There are three typical scenarios.

You mistyped your address

If you made a single typo in your address when signing up, the verification email goes to the real owner of that address. If they click the link, they've attached your account to their address. Most people ignore a verification email they don't recognise, but there's no guarantee. That's why asking for the address twice on sign-up forms, or using double opt-in, makes sense.

You forwarded the email or shared a screenshot

An email you forward with "can you take a look at this?" goes along with the link inside it. Don't share a verification or password reset link that hasn't expired yet with anyone.

You got a fake "verification" email

There's also a risk from the other direction, because scammers also send emails titled "verify your account". The link in them takes you not to the real site but to a fake page asking for your password. A genuine verification link usually doesn't ask for your password again just to confirm your account. If a verification email arrives for a site you didn't sign up to, don't click it. We explain ways to check where a link goes beforehand in before you click a link.

Link or code?

Some sites send a 6-digit code instead of a link. Both serve the same purpose, but they work differently in use.

Verification linkVerification code
How do you use it?Click it and it opens in the browserRead it and type it into the sign-up screen
Opened on a different deviceUsually works, but some apps expect the same deviceIt doesn't matter which device you read it on
LifetimeVaries, from hours to daysUsually shorter, a matter of minutes
Affected by security scanners?Can beNo

If your code isn't arriving, we explain what to do in verification code not arriving.

Verifying with a temporary address

On Geçici Mail, a verification email usually lands in the inbox within a few seconds; the inbox refreshes itself every 5 seconds. When you open the email, the link is clickable, and the message is shown sanitised, inside a separate frame. A few practical notes:

  • Don't leave the link too long. Incoming emails are deleted automatically after 24 hours, and the site's own time limit may be shorter.
  • If you need to complete verification on another device, note down the recovery key shown next to the green key icon, then use Recover Email in the menu on the other device to get back to the same address.
  • If you'll be using an account for a long time, future password reset links will also go to this address. For accounts like that, a permanent address is the better choice.

FAQ

Why does my verification link say it has expired?

Verification links stop working after a set time for security reasons. Also, if you requested a new link, the old one may have been cancelled; use the link in the most recent email.

Can I click a verification link twice?

On most sites, no; the link is single-use. If your account was verified on the first click, it's normal to see "invalid" or "already verified" on the second.

Why does the link show as used when I never clicked it?

Some corporate email security systems open links automatically while scanning messages. If the site counts a single visit as verification, the link may have been used up at that point.

Is it dangerous to share a verification link with someone?

Yes. The link treats whoever can read the email as the account owner. Sharing a link that hasn't expired can mean handing control of your account to someone else.

More Articles