[PR #8646] [CLOSED] fix(scim): return 204 instead of 400 for no-op PATCH requests #25016

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8646
Author: @himself65
Created: 3/16/2026
Status: Closed

Base: canaryHead: fix/scim-patch-no-op-204-8549


📝 Commits (10+)

  • 545a73d ci: continue on error
  • 0ff021d chore: release v1.5.0
  • d567e1d feat(blog): add draft support for blog posts and update image URLs
  • cdcdc3d chore(blog): update image URLs to use absolute paths for consistency
  • 5224a3f chore: remove draft
  • c14c404 fix: update sign-in link to use absolute URL for better accessibility
  • d760222 docs(expo): update Metro config for Expo SDK 53+ (#8220)
  • 7c8bece docs: fix release og path
  • 848e5f8 refactor: replace Link components with anchor tags for sign-in links
  • fd37e60 chore: improve readme description

📊 Changes

375 files changed (+40522 additions, -14226 deletions)

View changed files

📝 .cspell/auth-terms.txt (+1 -0)
📝 .cspell/custom-words.txt (+3 -1)
📝 .cspell/names.txt (+2 -0)
📝 .cspell/tech-terms.txt (+7 -2)
📝 .cspell/third-party.txt (+3 -0)
.github/workflows/demo.yml (+56 -0)
.github/workflows/npm-dist-tag.yml (+35 -0)
📝 .github/workflows/release.yml (+1 -0)
📝 .gitignore (+1 -0)
📝 .remarkignore (+1 -0)
📝 CLAUDE.md (+13 -2)
📝 CONTRIBUTING.md (+1 -1)
📝 biome.json (+2 -1)
📝 demo/electron/package.json (+10 -10)
demo/electron/pnpm-lock.yaml (+4736 -0)
demo/electron/pnpm-workspace.yaml (+4 -0)
demo/expo/.claude/agents/cherry-pick-release.md (+184 -0)
📝 demo/expo/app.config.ts (+0 -4)
📝 demo/expo/metro.config.js (+1 -5)
📝 demo/expo/package.json (+24 -23)

...and 80 more files

📄 Description

Summary

  • Per RFC 7644, a SCIM PATCH request that results in no changes (e.g., value already exists, unknown fields, empty operations) should return 204 No Content instead of 400 Bad Request.
  • This fixes issues where identity providers (IDPs) send patch requests on users whose data is already up-to-date, which previously caused spurious 400 errors.
  • Updated 3 related tests to expect 204 success instead of 400 errors.

Closes #8549

Test plan

  • All 19 tests in packages/scim/src/scim-patch.test.ts pass
  • Build succeeds

🔄 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/8646 **Author:** [@himself65](https://github.com/himself65) **Created:** 3/16/2026 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/scim-patch-no-op-204-8549` --- ### 📝 Commits (10+) - [`545a73d`](https://github.com/better-auth/better-auth/commit/545a73d10c58978d1324e7839e263e3d9aeb36fa) ci: continue on error - [`0ff021d`](https://github.com/better-auth/better-auth/commit/0ff021d0a4f4bd387a9674061e7e97a00c24949c) chore: release v1.5.0 - [`d567e1d`](https://github.com/better-auth/better-auth/commit/d567e1dee4a084315bd316865a20dae71456c0d0) feat(blog): add draft support for blog posts and update image URLs - [`cdcdc3d`](https://github.com/better-auth/better-auth/commit/cdcdc3d05dfd35fe52ef259498d5d614a229bef8) chore(blog): update image URLs to use absolute paths for consistency - [`5224a3f`](https://github.com/better-auth/better-auth/commit/5224a3fe2095b97fe69a6c1486bc9bf6eac403c9) chore: remove draft - [`c14c404`](https://github.com/better-auth/better-auth/commit/c14c40433dd3871ef63c80bcc640f99d9fd54801) fix: update sign-in link to use absolute URL for better accessibility - [`d760222`](https://github.com/better-auth/better-auth/commit/d76022210fba065140d3f7401507945ae815c340) docs(expo): update Metro config for Expo SDK 53+ (#8220) - [`7c8bece`](https://github.com/better-auth/better-auth/commit/7c8bece3fac6f950b46f2ad8d4fe46e75f9ce1a2) docs: fix release og path - [`848e5f8`](https://github.com/better-auth/better-auth/commit/848e5f8a67029fedaf929f2257851c89ef04aff8) refactor: replace Link components with anchor tags for sign-in links - [`fd37e60`](https://github.com/better-auth/better-auth/commit/fd37e60c7047a1b18acb6c29e4bfec55fbb5375d) chore: improve readme description ### 📊 Changes **375 files changed** (+40522 additions, -14226 deletions) <details> <summary>View changed files</summary> 📝 `.cspell/auth-terms.txt` (+1 -0) 📝 `.cspell/custom-words.txt` (+3 -1) 📝 `.cspell/names.txt` (+2 -0) 📝 `.cspell/tech-terms.txt` (+7 -2) 📝 `.cspell/third-party.txt` (+3 -0) ➕ `.github/workflows/demo.yml` (+56 -0) ➕ `.github/workflows/npm-dist-tag.yml` (+35 -0) 📝 `.github/workflows/release.yml` (+1 -0) 📝 `.gitignore` (+1 -0) 📝 `.remarkignore` (+1 -0) 📝 `CLAUDE.md` (+13 -2) 📝 `CONTRIBUTING.md` (+1 -1) 📝 `biome.json` (+2 -1) 📝 `demo/electron/package.json` (+10 -10) ➕ `demo/electron/pnpm-lock.yaml` (+4736 -0) ➕ `demo/electron/pnpm-workspace.yaml` (+4 -0) ➕ `demo/expo/.claude/agents/cherry-pick-release.md` (+184 -0) 📝 `demo/expo/app.config.ts` (+0 -4) 📝 `demo/expo/metro.config.js` (+1 -5) 📝 `demo/expo/package.json` (+24 -23) _...and 80 more files_ </details> ### 📄 Description ## Summary - Per RFC 7644, a SCIM PATCH request that results in no changes (e.g., value already exists, unknown fields, empty operations) should return **204 No Content** instead of **400 Bad Request**. - This fixes issues where identity providers (IDPs) send patch requests on users whose data is already up-to-date, which previously caused spurious 400 errors. - Updated 3 related tests to expect 204 success instead of 400 errors. Closes #8549 ## Test plan - [x] All 19 tests in `packages/scim/src/scim-patch.test.ts` pass - [x] Build succeeds --- <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:41:30 -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#25016