[PR #6639] [MERGED] feat(scim): add SCIM demo #32398

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6639
Author: @jonathansamines
Created: 12/9/2025
Status: Merged
Merged: 1/14/2026
Merged by: @himself65

Base: canaryHead: feat/scim-demo


📝 Commits (10+)

  • 48c8a21 chore(demo): add basic SCIM demo
  • f42b013 chore(scim): add support for default SCIM tokens
  • 0bf9a4b chore(demo): add link to demo
  • 8d26bde chore(scim): validate default SCIM tokens
  • 9f300ec chore(scim): fix misleading comment
  • 328f247 docs(scim): use a simpler optional format
  • 4d9c6ed chore(scim): remove unnecessary default scim tokens logic
  • f4eb727 Merge branch 'canary' into feat/scim-demo
  • 82390e1 Merge branch 'canary' into feat/scim-demo
  • ee17a60 fix: type

📊 Changes

9 files changed (+366 additions, -79 deletions)

View changed files

📝 demo/nextjs/app/api/auth/[...all]/route.ts (+7 -1)
📝 demo/nextjs/lib/auth.ts (+118 -0)
📝 demo/nextjs/package.json (+1 -0)
📝 docs/content/docs/examples/next-js.mdx (+4 -1)
📝 docs/content/docs/plugins/scim.mdx (+27 -0)
📝 packages/scim/src/middlewares.ts (+24 -1)
📝 packages/scim/src/scim.test.ts (+177 -76)
📝 packages/scim/src/types.ts (+5 -0)
📝 pnpm-lock.yaml (+3 -0)

📄 Description

Summary by cubic

Adds a SCIM demo and support for default SCIM tokens, so you can test SCIM sync without provisioning providers in the database. Also enables all HTTP methods on the Next.js auth route and updates docs and tests.

  • New Features

    • SCIM plugin: new defaultSCIM option to supply providerId/scimToken (and optional organizationId), used by middleware before DB lookup.
    • Next.js demo wired with SCIM and exposes POST/GET/PUT/PATCH/DELETE handlers; demo includes a default token for quick testing.
    • Tests added for the default SCIM provider path (CRUD user operations).
  • Docs

    • Added a SCIM Sync example to the Next.js demo instructions.
    • Documented default SCIM token setup and the required base64 format: base64(scimToken:providerId[:organizationId]).

Written for commit d4b50f7a8f. 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/6639 **Author:** [@jonathansamines](https://github.com/jonathansamines) **Created:** 12/9/2025 **Status:** ✅ Merged **Merged:** 1/14/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `feat/scim-demo` --- ### 📝 Commits (10+) - [`48c8a21`](https://github.com/better-auth/better-auth/commit/48c8a214d6dc83e797d59c237c46b6d3df844a85) chore(demo): add basic SCIM demo - [`f42b013`](https://github.com/better-auth/better-auth/commit/f42b013afdefa0a01237a27d866627cffaa0286d) chore(scim): add support for default SCIM tokens - [`0bf9a4b`](https://github.com/better-auth/better-auth/commit/0bf9a4bdb570528f6ba73203bc400fc9abcce83d) chore(demo): add link to demo - [`8d26bde`](https://github.com/better-auth/better-auth/commit/8d26bde68a8f847490f3b2643d7cc9eb9896af20) chore(scim): validate default SCIM tokens - [`9f300ec`](https://github.com/better-auth/better-auth/commit/9f300ec492d8ac16fcf471acddfad19bb1bdd2d8) chore(scim): fix misleading comment - [`328f247`](https://github.com/better-auth/better-auth/commit/328f247148d37a0a78769b60f13e794efcd0dfa0) docs(scim): use a simpler optional format - [`4d9c6ed`](https://github.com/better-auth/better-auth/commit/4d9c6ed101b16ed662b5a5cb228dbe9c25f753a7) chore(scim): remove unnecessary default scim tokens logic - [`f4eb727`](https://github.com/better-auth/better-auth/commit/f4eb727741613773ff7328db6e6f3c7aa7307bbc) Merge branch 'canary' into feat/scim-demo - [`82390e1`](https://github.com/better-auth/better-auth/commit/82390e186eb8fa728853514fc2e9467fecbc3d1e) Merge branch 'canary' into feat/scim-demo - [`ee17a60`](https://github.com/better-auth/better-auth/commit/ee17a606a9272355e95012e57fdf688c1180be04) fix: type ### 📊 Changes **9 files changed** (+366 additions, -79 deletions) <details> <summary>View changed files</summary> 📝 `demo/nextjs/app/api/auth/[...all]/route.ts` (+7 -1) 📝 `demo/nextjs/lib/auth.ts` (+118 -0) 📝 `demo/nextjs/package.json` (+1 -0) 📝 `docs/content/docs/examples/next-js.mdx` (+4 -1) 📝 `docs/content/docs/plugins/scim.mdx` (+27 -0) 📝 `packages/scim/src/middlewares.ts` (+24 -1) 📝 `packages/scim/src/scim.test.ts` (+177 -76) 📝 `packages/scim/src/types.ts` (+5 -0) 📝 `pnpm-lock.yaml` (+3 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Adds a SCIM demo and support for default SCIM tokens, so you can test SCIM sync without provisioning providers in the database. Also enables all HTTP methods on the Next.js auth route and updates docs and tests. - **New Features** - SCIM plugin: new defaultSCIM option to supply providerId/scimToken (and optional organizationId), used by middleware before DB lookup. - Next.js demo wired with SCIM and exposes POST/GET/PUT/PATCH/DELETE handlers; demo includes a default token for quick testing. - Tests added for the default SCIM provider path (CRUD user operations). - **Docs** - Added a SCIM Sync example to the Next.js demo instructions. - Documented default SCIM token setup and the required base64 format: base64(scimToken:providerId[:organizationId]). <sup>Written for commit d4b50f7a8f35269f64aca2817692e40da0b2ff80. 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-17 23:13:23 -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#32398