[GH-ISSUE #499] Wrong baseURL Used in Login Email Verification Re-sends #8297

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

Originally created by @alhassanalbadri on GitHub (Nov 11, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/499

Describe the bug
The bug is basically that when the requireEmailVerification flag is set to true, then an email is re-sent on every login attempt with an unverified email. On register, it is correctly parsed and is sent as follows: http://localhost:3000/api/auth/verify-email?token=.... However, subsequent attempts form such a url: http://localhost:3000/verify-email?token=token

To Reproduce
Steps to reproduce the behavior:

  1. Enable emailAndPassword in your config.
  2. Enable requireEmailVerification.
  3. First register, and notice the outputted url.
  4. Then login without verifying, and notice the different url.

Expected behavior
Both urls should match, the first one is the correct one.

Desktop (please complete the following information): N/A

Smartphone (please complete the following information): N/A

Originally created by @alhassanalbadri on GitHub (Nov 11, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/499 **Describe the bug** The bug is basically that when the `requireEmailVerification` flag is set to true, then an email is re-sent on every login attempt with an unverified email. On register, it is correctly parsed and is sent as follows: `http://localhost:3000/api/auth/verify-email?token=...`. However, subsequent attempts form such a url: `http://localhost:3000/verify-email?token=token` **To Reproduce** Steps to reproduce the behavior: 1. Enable emailAndPassword in your config. 2. Enable `requireEmailVerification`. 3. First register, and notice the outputted url. 4. Then login without verifying, and notice the different url. **Expected behavior** Both urls should match, the first one is the correct one. **Desktop (please complete the following information):** N/A **Smartphone (please complete the following information):** N/A
GiteaMirror added the locked label 2026-04-13 03:22: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#8297