[PR #3581] [MERGED] feat: list organization memebrs with pagination and filter queries #13142

Closed
opened 2026-04-13 08:47:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3581
Author: @Bekacru
Created: 7/24/2025
Status: Merged
Merged: 7/24/2025
Merged by: @Bekacru

Base: nextHead: feat/list-members


📝 Commits (10+)

  • c83b23c docs(api-key): move schema section to the bottom
  • 4d7676d fix: shouldn't refresh a token if access token expires is undefined or null (#3577)
  • 01814c5 fix: ensure session is added to context when reading from cookie cache (#3578)
  • 8a75cc3 feat(organization): add membersLimit param to allow to fetch more or less members than the membership limit
  • 6f1833b add test
  • 26965c9 Update packages/better-auth/src/plugins/organization/adapter.ts
  • 6c8871b feat(organization): add list members with pagination and filter
  • f4e29a3 Merge branch 'next' into feat/list-members
  • f071ebb chore: lint
  • 4859cf4 cleannup

📊 Changes

7 files changed (+374 additions, -31 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/adapter.ts (+80 -8)
📝 packages/better-auth/src/plugins/organization/organization.test.ts (+0 -14)
📝 packages/better-auth/src/plugins/organization/organization.ts (+30 -0)
📝 packages/better-auth/src/plugins/organization/routes/crud-invites.ts (+4 -4)
packages/better-auth/src/plugins/organization/routes/crud-members.test.ts (+171 -0)
📝 packages/better-auth/src/plugins/organization/routes/crud-members.ts (+89 -2)
📝 packages/better-auth/src/plugins/organization/routes/crud-org.test.ts (+0 -3)

📄 Description

Summary by cubic

Added support for listing organization members with pagination, sorting, and filtering options, and introduced a membersLimit parameter to control the number of members returned.

  • New Features
    • Added a new listMembers endpoint to fetch organization members with limit, offset, sort, and filter query parameters.
    • Updated getFullOrganization to accept a membersLimit parameter for flexible member retrieval.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/3581 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 7/24/2025 **Status:** ✅ Merged **Merged:** 7/24/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `next` ← **Head:** `feat/list-members` --- ### 📝 Commits (10+) - [`c83b23c`](https://github.com/better-auth/better-auth/commit/c83b23c6ba7494d5997a06250d48d1777a2fabcf) docs(api-key): move schema section to the bottom - [`4d7676d`](https://github.com/better-auth/better-auth/commit/4d7676d8d9c40a2d5dc30ad2b46810692d3631e8) fix: shouldn't refresh a token if access token expires is undefined or null (#3577) - [`01814c5`](https://github.com/better-auth/better-auth/commit/01814c55e0392ab09f990444fd5e9d5ab81d9e56) fix: ensure session is added to context when reading from cookie cache (#3578) - [`8a75cc3`](https://github.com/better-auth/better-auth/commit/8a75cc320b3085160cfec59300a6c795fdd7af36) feat(organization): add membersLimit param to allow to fetch more or less members than the membership limit - [`6f1833b`](https://github.com/better-auth/better-auth/commit/6f1833be7a86449c6ccfcde6e6772ddb285e7f8c) add test - [`26965c9`](https://github.com/better-auth/better-auth/commit/26965c97895540d7dbc0fd73d6f8ee17dcf187e1) Update packages/better-auth/src/plugins/organization/adapter.ts - [`6c8871b`](https://github.com/better-auth/better-auth/commit/6c8871b935bdf90914e84c463a04f20a70f161c7) feat(organization): add list members with pagination and filter - [`f4e29a3`](https://github.com/better-auth/better-auth/commit/f4e29a35040d56ea3487881d2c680c6b54aada3a) Merge branch 'next' into feat/list-members - [`f071ebb`](https://github.com/better-auth/better-auth/commit/f071ebb79b49b74eebcc010b3c3a4baf3bdb9bdd) chore: lint - [`4859cf4`](https://github.com/better-auth/better-auth/commit/4859cf41579d879c2092a234cb10b62e31fbf8e2) cleannup ### 📊 Changes **7 files changed** (+374 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/adapter.ts` (+80 -8) 📝 `packages/better-auth/src/plugins/organization/organization.test.ts` (+0 -14) 📝 `packages/better-auth/src/plugins/organization/organization.ts` (+30 -0) 📝 `packages/better-auth/src/plugins/organization/routes/crud-invites.ts` (+4 -4) ➕ `packages/better-auth/src/plugins/organization/routes/crud-members.test.ts` (+171 -0) 📝 `packages/better-auth/src/plugins/organization/routes/crud-members.ts` (+89 -2) 📝 `packages/better-auth/src/plugins/organization/routes/crud-org.test.ts` (+0 -3) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Added support for listing organization members with pagination, sorting, and filtering options, and introduced a membersLimit parameter to control the number of members returned. - **New Features** - Added a new listMembers endpoint to fetch organization members with limit, offset, sort, and filter query parameters. - Updated getFullOrganization to accept a membersLimit parameter for flexible member retrieval. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 08:47:10 -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#13142