feat: add resend verification email#340
Merged
mbarrenechea merged 12 commits intodevelopfrom Apr 14, 2026
Merged
Conversation
Design spec for adding a "Resend email" button to the Check Your Email page, backed by a custom Payload CMS endpoint that regenerates verification tokens and re-sends the email via AWS SES.
7-task TDD plan covering: shared email helper, endpoint handler, i18n translations, sign-up redirect, and CheckYourEmail component with 30-second cooldown resend button.
Implements POST /api/users/resend-verification Payload CMS endpoint that generates a new token, updates the user record, and sends a verification email — returning a generic success response in all cases to prevent user enumeration.
Inline short parameter types and assertion strings for readability.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add resend button to CheckYourEmail component that calls the /v1/api/users/resend-verification endpoint, with a 30-second cooldown and countdown display after clicking. Install @testing-library/user-event and cover all behaviour with 7 unit tests (TDD).
Use node: protocol prefix for crypto import.
…(MINOR) Mark component props as read-only; use globalThis over global.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
/api/users/resend-verificationendpoint that rate-limits and resends verification emails to unverified usersbuildVerifyEmailHTMLhelper, reused by both Payload's built-in verify flow and the new resend endpointTest plan
buildVerifyEmailHTML(verify URL construction, email greeting, HTML structure)resend-verificationendpoint (success, already verified, user not found, rate limiting, missing email)POST /api/users/resend-verificationwith a valid unverified email and confirm email is sent