[PR #3835] [MERGED] fix(organization): fix convert emails to lower case #13284

Closed
opened 2026-04-13 08:51:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3835
Author: @gwoodbridge
Created: 8/6/2025
Status: Merged
Merged: 8/7/2025
Merged by: @Bekacru

Base: canaryHead: fix/organization-email


📝 Commits (5)

  • 650bc12 fix(organization): convert emails to lower case
  • 9d52931 Merge branch 'better-auth:canary' into fix/organization-email
  • b7cc71c Add tests and convert listUserInvitations to lower case
  • 9951554 Fix lint and tests now that a new user is added to org
  • 43db3e2 Fix typecheck

📊 Changes

2 files changed (+104 additions, -6 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/adapter.ts (+3 -3)
📝 packages/better-auth/src/plugins/organization/organization.test.ts (+101 -3)

📄 Description

Both the findMemberByEmail and findPendingInvitation functions can accept email addresses that haven't been converted to lowercase. Currently searching for a member or pending invitations with any uppercase characters won't find the appropriate user or invitations.


Summary by cubic

Fixed member and invitation lookups to always use lowercase emails, so searches work even if uppercase letters are used.


🔄 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/3835 **Author:** [@gwoodbridge](https://github.com/gwoodbridge) **Created:** 8/6/2025 **Status:** ✅ Merged **Merged:** 8/7/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/organization-email` --- ### 📝 Commits (5) - [`650bc12`](https://github.com/better-auth/better-auth/commit/650bc12068a039aaf3a474a3d4f7e515435b04a8) fix(organization): convert emails to lower case - [`9d52931`](https://github.com/better-auth/better-auth/commit/9d529314580dc79883ebe4aa075aff0500e5d0ff) Merge branch 'better-auth:canary' into fix/organization-email - [`b7cc71c`](https://github.com/better-auth/better-auth/commit/b7cc71c1f0bdae3f95c8cb23bb29eadf96a20152) Add tests and convert listUserInvitations to lower case - [`9951554`](https://github.com/better-auth/better-auth/commit/995155459d9f8f0901f4b59e848b1410555ab467) Fix lint and tests now that a new user is added to org - [`43db3e2`](https://github.com/better-auth/better-auth/commit/43db3e25b1b73e450e5043bc3e6632821a29762c) Fix typecheck ### 📊 Changes **2 files changed** (+104 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/adapter.ts` (+3 -3) 📝 `packages/better-auth/src/plugins/organization/organization.test.ts` (+101 -3) </details> ### 📄 Description Both the findMemberByEmail and findPendingInvitation functions can accept email addresses that haven't been converted to lowercase. Currently searching for a member or pending invitations with any uppercase characters won't find the appropriate user or invitations. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixed member and invitation lookups to always use lowercase emails, so searches work even if uppercase letters are used. <!-- 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-13 08:51:17 -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#13284