Skip to content

feat: add resend verification email#340

Merged
mbarrenechea merged 12 commits intodevelopfrom
feat/resend-verification-email
Apr 14, 2026
Merged

feat: add resend verification email#340
mbarrenechea merged 12 commits intodevelopfrom
feat/resend-verification-email

Conversation

@mbarrenechea
Copy link
Copy Markdown
Member

Summary

  • Add a /api/users/resend-verification endpoint that rate-limits and resends verification emails to unverified users
  • Extract the verification email HTML template into a shared buildVerifyEmailHTML helper, reused by both Payload's built-in verify flow and the new resend endpoint
  • Pass the user's email to the check-your-email page via query param so future UI can display it and trigger resend
  • Add i18n keys (en/es/pt) for the resend verification email feature
  • Include design spec and implementation plan docs

Test plan

  • Unit tests for buildVerifyEmailHTML (verify URL construction, email greeting, HTML structure)
  • Unit tests for resend-verification endpoint (success, already verified, user not found, rate limiting, missing email)
  • Manual test: sign up → land on check-your-email page → verify email param is passed in URL
  • Manual test: call POST /api/users/resend-verification with a valid unverified email and confirm email is sent
  • Manual test: call endpoint again within 60s and confirm 429 rate limit response

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.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
amazonia-360 Ready Ready Preview, Comment Apr 14, 2026 3:10pm

Request Review

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).
…(MINOR)

Mark component props as read-only; use globalThis over global.
@sonarqubecloud
Copy link
Copy Markdown

@mbarrenechea mbarrenechea merged commit 4b8af33 into develop Apr 14, 2026
13 checks passed
@mbarrenechea mbarrenechea deleted the feat/resend-verification-email branch April 14, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant