[GH-ISSUE #441] Email Validity is checked twice in sign-in route handler #8275

Closed
opened 2026-04-13 03:21:22 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @itsderinger on GitHub (Nov 7, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/441

Describe the bug
The validity of the email input is checked twice in the route handler for the sign-in.

To Reproduce
The duplicate validity check can be found in lines 93-98 of /src/api/routes/sign-in.ts (Link). The check, however, is already performed here.

Expected behavior
The validity should only be checked once to make the code base more concise and avoid confusion in the future.
It's a fairly easy fix - happy to create a PR. :)

Originally created by @itsderinger on GitHub (Nov 7, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/441 **Describe the bug** The validity of the email input is checked twice in the route handler for the `sign-in`. **To Reproduce** The duplicate validity check can be found in lines 93-98 of `/src/api/routes/sign-in.ts` ([Link](https://github.com/better-auth/better-auth/blob/main/packages/better-auth/src/api/routes/sign-in.ts#L93-L98)). The check, however, is already performed [here](https://github.com/better-auth/better-auth/blob/main/packages/better-auth/src/api/routes/sign-in.ts#L87-L92). **Expected behavior** The validity should only be checked once to make the code base more concise and avoid confusion in the future. It's a fairly easy fix - happy to create a PR. :)
GiteaMirror added the locked label 2026-04-13 03:21:22 -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#8275