[PR #5633] fix: allow admins to send verification emails to unverified users #23029

Open
opened 2026-04-15 21:26:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5633
Author: @ephraimduncan
Created: 10/28/2025
Status: 🔄 Open

Base: mainHead: fix/admin-verification-email


📝 Commits (4)

  • 11135c3 fix: allow admins to send verification emails to unverified users
  • ab02a57 Merge branch 'canary' into fix/admin-verification-email
  • 539c23c fix: tests
  • b34a98d Merge branch 'canary' into fix/admin-verification-email

📊 Changes

2 files changed (+96 additions, -52 deletions)

View changed files

📝 packages/better-auth/src/api/routes/email-verification.ts (+53 -8)
📝 packages/better-auth/src/plugins/admin/admin.test.ts (+43 -44)

📄 Description

Fixes: #5621


Summary by cubic

Let admins send verification emails to other users who are not yet verified. Non-admins can only send to their own unverified email.

  • New Features
    • Require admin plugin and user:update permission to send on behalf of others.
    • Lookup target user by email; return status true if not found to avoid information leaks.
    • Block sending when the target email is already verified.

Written for commit b34a98d1f0. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5633 **Author:** [@ephraimduncan](https://github.com/ephraimduncan) **Created:** 10/28/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/admin-verification-email` --- ### 📝 Commits (4) - [`11135c3`](https://github.com/better-auth/better-auth/commit/11135c366c50d19590bec41b5eb75163a092c460) fix: allow admins to send verification emails to unverified users - [`ab02a57`](https://github.com/better-auth/better-auth/commit/ab02a57861c240b2413747a4c6b2bcaa5d052f24) Merge branch 'canary' into fix/admin-verification-email - [`539c23c`](https://github.com/better-auth/better-auth/commit/539c23c0b39f70c225b00904fa7c31608a7b4ed5) fix: tests - [`b34a98d`](https://github.com/better-auth/better-auth/commit/b34a98d1f0bdacf006481a5abf41d4cb9a9d884e) Merge branch 'canary' into fix/admin-verification-email ### 📊 Changes **2 files changed** (+96 additions, -52 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/email-verification.ts` (+53 -8) 📝 `packages/better-auth/src/plugins/admin/admin.test.ts` (+43 -44) </details> ### 📄 Description Fixes: #5621 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Let admins send verification emails to other users who are not yet verified. Non-admins can only send to their own unverified email. - **New Features** - Require admin plugin and user:update permission to send on behalf of others. - Lookup target user by email; return status true if not found to avoid information leaks. - Block sending when the target email is already verified. <sup>Written for commit b34a98d1f0bdacf006481a5abf41d4cb9a9d884e. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 21:26:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#23029