[GH-ISSUE #3255] Expired invitations to join an organization are still listed by listInvitations() #18173

Closed
opened 2026-04-15 16:33:23 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @utopyin on GitHub (Jul 3, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/3255

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Change the expires_at value of an invitation to make the invitation expired
  2. List the invitations using the better auth client method organization.listInvitations()
  3. The invitation still appears in the results even though it is expired and organization.getInvitation() will return a 404 error

Current vs. Expected behavior

When expired, the invitation should not be returned by listInvitations

What version of Better Auth are you using?

1.2.12

Provide environment information

- OS: MacOS

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

Backend

Auth config (if applicable)


Additional context

No response

Originally created by @utopyin on GitHub (Jul 3, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/3255 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Change the expires_at value of an invitation to make the invitation expired 2. List the invitations using the better auth client method `organization.listInvitations()` 3. The invitation still appears in the results even though it is expired and `organization.getInvitation()` will return a 404 error ### Current vs. Expected behavior When expired, the invitation should not be returned by listInvitations ### What version of Better Auth are you using? 1.2.12 ### Provide environment information ```bash - OS: MacOS ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript ``` ### Additional context _No response_
GiteaMirror added the lockedbug labels 2026-04-15 16:33:23 -05:00
Author
Owner

@utopyin commented on GitHub (Jul 3, 2025):

I closed the issue as I figured by looking into the source code of the method that it was intentional!

<!-- gh-comment-id:3032461992 --> @utopyin commented on GitHub (Jul 3, 2025): I closed the issue as I figured by looking into the source code of the method that it was intentional!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#18173