[PR #7808] [MERGED] chore(scim): fix empty IN queries in user list endpoint #24465

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7808
Author: @jonathansamines
Created: 2/5/2026
Status: Merged
Merged: 2/5/2026
Merged by: @himself65

Base: canaryHead: chore/fix-scim-empty-members-query


📝 Commits (3)

  • 7b284bc chore(scim): add failing test for empty in query
  • 3fa917d chore(scim): fix empty IN queries
  • 7d234de chore(scim): fix linting

📊 Changes

2 files changed (+129 additions, -0 deletions)

View changed files

📝 packages/scim/src/routes.ts (+22 -0)
📝 packages/scim/src/scim.test.ts (+107 -0)

📄 Description

Summary by cubic

Fixes the SCIM /Users list to return a proper empty ListResponse when a provider or organization has no users, avoiding empty IN queries and preventing errors.

  • Bug Fixes
    • Return an empty SCIM ListResponse when accountUserIds or memberUserIds is empty.
    • Avoid DB queries with IN [] on user ID filters.
    • Added tests to confirm empty list behavior for providers and organizations (Postgres).

Written for commit 7d234de40b. Summary will update on new commits.


🔄 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/7808 **Author:** [@jonathansamines](https://github.com/jonathansamines) **Created:** 2/5/2026 **Status:** ✅ Merged **Merged:** 2/5/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `chore/fix-scim-empty-members-query` --- ### 📝 Commits (3) - [`7b284bc`](https://github.com/better-auth/better-auth/commit/7b284bc34310931685516917e3e2242510ed08bf) chore(scim): add failing test for empty in query - [`3fa917d`](https://github.com/better-auth/better-auth/commit/3fa917d5b06deef0d0e7d52b67c8b7932bbd598b) chore(scim): fix empty IN queries - [`7d234de`](https://github.com/better-auth/better-auth/commit/7d234de40bf8a1c3752b9a0557c7629b62da06e5) chore(scim): fix linting ### 📊 Changes **2 files changed** (+129 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/scim/src/routes.ts` (+22 -0) 📝 `packages/scim/src/scim.test.ts` (+107 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Fixes the SCIM /Users list to return a proper empty ListResponse when a provider or organization has no users, avoiding empty IN queries and preventing errors. - **Bug Fixes** - Return an empty SCIM ListResponse when accountUserIds or memberUserIds is empty. - Avoid DB queries with IN [] on user ID filters. - Added tests to confirm empty list behavior for providers and organizations (Postgres). <sup>Written for commit 7d234de40bf8a1c3752b9a0557c7629b62da06e5. Summary will update on new commits.</sup> <!-- 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-15 22:23:13 -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#24465