[PR #3786] [CLOSED] feat: add email normalizer option #5003

Closed
opened 2026-03-13 12:07:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3786
Author: @Bekacru
Created: 8/4/2025
Status: Closed

Base: canaryHead: feat/email-normalizer


📝 Commits (2)

📊 Changes

10 files changed (+50 additions, -19 deletions)

View changed files

📝 packages/better-auth/src/__snapshots__/init.test.ts.snap (+1 -0)
📝 packages/better-auth/src/api/routes/email-verification.ts (+1 -1)
📝 packages/better-auth/src/api/routes/sign-up.ts (+1 -1)
📝 packages/better-auth/src/api/routes/update-user.ts (+1 -1)
📝 packages/better-auth/src/db/internal-adapter.ts (+6 -5)
📝 packages/better-auth/src/init.ts (+15 -1)
📝 packages/better-auth/src/oauth2/link-account.ts (+4 -4)
📝 packages/better-auth/src/plugins/generic-oauth/index.ts (+1 -1)
📝 packages/better-auth/src/plugins/organization/routes/crud-invites.ts (+14 -5)
📝 packages/better-auth/src/types/options.ts (+6 -0)

📄 Description

Currently, there's no way to customize email normalization, for example, if users want to keep uppercase emails or apply a custom normalizer. This PR adds an option to customize how email normalization is handled


Summary by cubic

Added support for custom email normalization, allowing apps to define how user emails are processed instead of always converting to lowercase.

  • New Features
    • Introduced an emailNormalization option for custom logic or disabling normalization.
    • Updated all email handling to use the new normalization method.

🔄 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/3786 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 8/4/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `feat/email-normalizer` --- ### 📝 Commits (2) - [`ad609d3`](https://github.com/better-auth/better-auth/commit/ad609d37f69683af2b708bd475a7d2f2cb9f2fe2) feat: add email normalizer - [`e76bd4f`](https://github.com/better-auth/better-auth/commit/e76bd4fcbfc519b35d413478a87ded39ddbe2798) chore: update snapshot ### 📊 Changes **10 files changed** (+50 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/__snapshots__/init.test.ts.snap` (+1 -0) 📝 `packages/better-auth/src/api/routes/email-verification.ts` (+1 -1) 📝 `packages/better-auth/src/api/routes/sign-up.ts` (+1 -1) 📝 `packages/better-auth/src/api/routes/update-user.ts` (+1 -1) 📝 `packages/better-auth/src/db/internal-adapter.ts` (+6 -5) 📝 `packages/better-auth/src/init.ts` (+15 -1) 📝 `packages/better-auth/src/oauth2/link-account.ts` (+4 -4) 📝 `packages/better-auth/src/plugins/generic-oauth/index.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/organization/routes/crud-invites.ts` (+14 -5) 📝 `packages/better-auth/src/types/options.ts` (+6 -0) </details> ### 📄 Description Currently, there's no way to customize email normalization, for example, if users want to keep uppercase emails or apply a custom normalizer. This PR adds an option to customize how email normalization is handled <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added support for custom email normalization, allowing apps to define how user emails are processed instead of always converting to lowercase. - **New Features** - Introduced an `emailNormalization` option for custom logic or disabling normalization. - Updated all email handling to use the new normalization method. <!-- 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-03-13 12:07:05 -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#5003