Skip to content

fix(email): verification code delivery#30

Merged
NodeByteLTD merged 1 commit into
mainfrom
develop
Jun 3, 2026
Merged

fix(email): verification code delivery#30
NodeByteLTD merged 1 commit into
mainfrom
develop

Conversation

@NodeByteLTD

@NodeByteLTD NodeByteLTD commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

Describe what changed and why.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Chore / maintenance

Testing

List what you ran:

  • pnpm lint
  • pnpm build
  • Relevant tests for changed area

Commands/results:

Paste test output or brief notes here.

Screenshots / Evidence (if applicable)

Add screenshots, recordings, or logs.

Checklist

  • I linked related issue(s)
  • I updated docs where needed
  • I updated changelog for user-facing changes
  • I removed secrets from code, logs, and screenshots

Summary by CodeRabbit

  • New Features
    • Added backup email verification: Users can now securely add a backup email address. A verification email with a time-limited token (15-minute expiry) is automatically sent to validate ownership.

@NodeByteLTD NodeByteLTD merged commit 3546c35 into main Jun 3, 2026
12 of 15 checks passed
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 19f6bd4d-5f43-48ec-af04-5d9c31084bbd

📥 Commits

Reviewing files that changed from the base of the PR and between f408756 and 22c59a0.

📒 Files selected for processing (2)
  • apps/web/src/server/api/routers/user.ts
  • apps/web/src/server/mailer.ts

Walkthrough

This PR activates backup email verification by adding a new sendBackupEmailVerificationEmail helper function to the mailer module and wiring it into the user router's addBackupEmail handler to send verification emails during pending-verification creation.

Changes

Backup Email Verification Flow

Layer / File(s) Summary
Email verification helper
apps/web/src/server/mailer.ts
New sendBackupEmailVerificationEmail(email, token) function constructs and sends a verification email with token and 15-minute expiry messaging, skipping in development mode.
Router integration
apps/web/src/server/api/routers/user.ts
Router imports and calls the new helper in addBackupEmail to send verification email to the backup address, replacing a previously commented-out TODO.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants