Checking if User is intended recipient of Invite is casesensetive #1031

Closed
opened 2026-03-13 08:19:43 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @SNRSE on GitHub (Apr 13, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Setup Better Auth with Organisations and email and password
  2. create a user with an Email that has upercase letters
  3. invite that user to an Organisation
  4. try to accept the invitation from this User

Current vs. Expected behavior

Right now, inviting Mail@example.com will cause an issue for the user mail@example.com when trying to accept it. For logging In the email gets converted toLowerCase so the same behaviors should happen when checking if the user is the recipient of an Invite

What version of Better Auth are you using?

1.2.5

Provide environment information

does not apply as it is an issue with the backend

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  emailAndPassword: {  
    enabled: true
  },
});

Additional context

No response

Originally created by @SNRSE on GitHub (Apr 13, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Setup Better Auth with Organisations and email and password 2. create a user with an Email that has upercase letters 3. invite that user to an Organisation 4. try to accept the invitation from this User ### Current vs. Expected behavior Right now, inviting Mail@example.com will cause an issue for the user mail@example.com when trying to accept it. For logging In the email gets converted toLowerCase so the same behaviors should happen when checking if the user is the recipient of an Invite ### What version of Better Auth are you using? 1.2.5 ### Provide environment information ```bash does not apply as it is an issue with the backend ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context _No response_
Author
Owner

@SNRSE commented on GitHub (Apr 13, 2025):

I have also created the following PR to adress this Bug : https://github.com/better-auth/better-auth/pull/2251

@SNRSE commented on GitHub (Apr 13, 2025): I have also created the following PR to adress this Bug : https://github.com/better-auth/better-auth/pull/2251
Author
Owner

@SNRSE commented on GitHub (Apr 13, 2025):

PR is merged so closing the issue

@SNRSE commented on GitHub (Apr 13, 2025): PR is merged so closing the issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#1031