ResendPhil NashProblem & solution
The Future of Email Verification
Summary
Email verification is currently a slow process that requires users to open their inbox, copy a code, or click a link, creating significant friction. Google is working on three improvements to streamline this process: a ‘Copy code’ button in Gmail, the Email Verification API spec, and the OTP-Token email header spec. The Email Verification API enables browsers and webmail providers to collaboratively generate a signed token, allowing servers to verify the user’s email address without the need to send a verification email. The OTP-Token header standardizes one-time codes with the intended origin in a machine-readable format, preventing phishing attacks just like the origin-bound one-time code format does for SMS in WebOTP. This could extend WebOTP to accept codes from email transports, although these specs are early drafts and not yet widely supported; developers can prepare by including the OTP-Token header in verification emails using services like Resend.
Context
Traditional email verification requires users to visit their inbox and copy a code or click a link, creating friction. Google is proposing three improvements to reduce this friction.
Approach / What changed
Google proposed three improvements: 1) A ‘Copy code’ button in Gmail that extracts one-time passwords from emails. 2) The Email Verification API, which lets browsers and webmail providers create a signed token that verifies email ownership without sending a verification email. 3) The OTP-Token email header spec, which includes the one-time code and its intended origin in machine-readable form, enabling phishing protection and potential integration with WebOTP to support email as a transport for one-time codes.
Takeaways
The Email Verification API eliminates the need to send a verification email by having the browser and webmail provider jointly create a signed token that the server validates.
The OTP-Token header includes the one-time code and the origin in machine-readable email headers, preventing phishing and mirroring the origin-bound format used in WebOTP for SMS.
WebOTP currently only supports SMS as a transport, but the OTP-Token draft spec could allow it to accept codes from emails by adding transport: [‘email’] to the credentials request.
FAQ
What is the OTP-Token header format?
The OTP-Token header is a proposed email header that contains the one-time code and the origin for which it is valid. Example: OTP-Token: '123456'; origin='https://example.com'. It is analogous to the last line of an origin-bound one-time code SMS.
How does the Email Verification API work?
The Email Verification API allows a browser and a webmail provider to generate a signed token together. The token is placed in a hidden input with autocomplete='email-verification-token'. The server validates the token, confirming the email belongs to the user without sending a verification email.
How can developers start using the OTP-Token header?
Developers can send the OTP-Token header in verification emails using an email service like Resend. The header is added as a custom header to the email object, e.g., headers: { 'OTP-Token': '"123456"; origin="https://example.com"' }.
Source and freshness
- Source
- resend.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.