[GH-ISSUE #567] Reset password invalid token #25645

Closed
opened 2026-04-17 15:53:57 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @Limerio on GitHub (Nov 17, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/567

Describe the bug
When trying to the normal forgot password flow. I had an invalid token error every time whatever if I reset my postgres database, switch to another adapter.

To Reproduce
Steps to reproduce the behavior:

  1. Do the normal forgot-password
  2. Email send to the mailbox with the link of the reset password
  3. Click in the link
  4. Invalid token

Expected behavior
Not an invalid token error.

Desktop:

  • OS: MacOS
  • Browser: Arc
  • Version: 1.69

Additional context
That is the cause by the expiresAt because new Date() use the timezone of your current machine.

Originally created by @Limerio on GitHub (Nov 17, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/567 **Describe the bug** When trying to the normal forgot password flow. I had an invalid token error every time whatever if I reset my postgres database, switch to another adapter. **To Reproduce** Steps to reproduce the behavior: 1. Do the normal forgot-password 2. Email send to the mailbox with the link of the reset password 3. Click in the link 4. Invalid token **Expected behavior** Not an invalid token error. **Desktop:** - OS: MacOS - Browser: Arc - Version: 1.69 **Additional context** That is the cause by the expiresAt because `new Date()` use the timezone of your current machine.
GiteaMirror added the locked label 2026-04-17 15:53:57 -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#25645