How Signup Email Verification Works

A technical breakdown of the signup verification flow — from form submission to email delivery to account activation.

Signup email verification is a simple user experience that hides considerable technical complexity. Understanding how it works helps developers implement it correctly and users troubleshoot when it fails.

The verification flow

  1. User submits signup form. The application receives user data including email address.
  2. Application validates input. Email format is checked, and the address may be screened against disposable-domain blocklists.
  3. Account is created in pending state. The user record is created but marked as unverified or inactive.
  4. Token generation. The application generates a random token (typically a 6-8 digit code or UUID) with an expiration time (5-30 minutes).
  5. Token storage. The token is stored in the database associated with the user account or signup session.
  6. li>Email construction. The application builds an email containing either a verification link with the token embedded or a code the user must enter.
  7. Email delivery. The application sends the email through a transactional email provider (SendGrid, Mailgun, AWS SES, etc.).
  8. User receives email. The user opens the email in their inbox.
  9. User completes verification. The user clicks the link or enters the code.
  10. Token validation. The application checks that the token matches, has not expired, and has not been used before.
  11. Account activation. On successful validation, the account is marked as verified and active.

Magic links: The email contains a URL like https://example.com/verify?token=abc123. Clicking the link automatically validates the token. This is the best user experience but requires the user to click from the same device and browser where they received the email.

OTP codes: The email contains a numeric code the user must manually enter. This works across devices but requires the user to copy or remember the code.

Both: Many services send both a link and a code as fallback options.

Security considerations

Token expiration: Tokens must expire quickly (typically 5-30 minutes) to prevent replay attacks.

One-time use: Tokens must be invalidated immediately after use to prevent replay.

Rate limiting: Limit how many verification emails can be requested per IP address or email address to prevent abuse.

Disposable domain detection: Many services check email domains against blocklists of known disposable email providers and reject signups from those domains.

Common failure points

Delivery delays: Greylisting, queueing, and slow delivery providers can delay verification emails.

Blocking: Disposable domains, spam filters, or aggressive security settings can prevent delivery entirely.

Token expiration: Users who wait too long to open the email may find the token has expired.

Broken links: Incorrect URL construction, missing parameters, or routing errors prevent magic links from working.

Temporary email and verification

Temporary email works well for verification when the service accepts disposable domains. The process is identical for the user: receive the email, click the link or enter the code, complete verification. The key difference is that the inbox expires automatically, so verification must be completed within the inbox lifetime.

For developers building verification systems, testing with temporary email provides a clean external recipient without polluting real user data or risking exposure of test credentials.

Questions

Should I send both a link and a code?
Yes, providing both options improves user experience. Links are more convenient for users on the same device, while codes work across devices. This accounts for users who may access email on their phone but complete the signup on their computer.
How long should verification tokens be valid?
Five to thirty minutes is typical. Shorter windows are more secure but may frustrate users. Longer windows increase replay attack risk. Balance security with user experience based on your threat model.

Keep reading

Need a throwaway address right now?

Open the generator and a fresh inbox is waiting before the page finishes settling.

Generate a temporary email