[PR #6726] [MERGED] feat(organization): export ./adapter.ts for plugin extensibility #32452

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6726
Author: @jpsullivan
Created: 12/13/2025
Status: Merged
Merged: 12/13/2025
Merged by: @himself65

Base: canaryHead: feature/export-organization-adapter


📝 Commits (4)

  • c937742 feat(organization): export ./adapter.ts for plugin extensibility
  • 96bb4bf Merge branch 'canary' into feature/export-organization-adapter
  • af7a90c lint fix
  • 1d7ce78 fix: update export statement for getOrgAdapter in organization index

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/index.ts (+1 -0)

📄 Description

This PR exports ./adapter.ts (specifically for getOrgAdapter) from the "organization" plugin to enable building extensions on top of it

Right now, if you want to build a plugin that extends organization functionality, you need to either duplicate the adapter logic or access internal APIs. Exporting getOrgAdapter lets developers reuse the existing type-safe operations instead.


Summary by cubic

Exported the organization plugin’s adapter (./adapter.ts) to expose getOrgAdapter so external plugins can reuse the type-safe organization operations instead of duplicating logic. This improves plugin extensibility without relying on internal APIs.

Written for commit 1d7ce78c8f. Summary will update automatically 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/6726 **Author:** [@jpsullivan](https://github.com/jpsullivan) **Created:** 12/13/2025 **Status:** ✅ Merged **Merged:** 12/13/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `feature/export-organization-adapter` --- ### 📝 Commits (4) - [`c937742`](https://github.com/better-auth/better-auth/commit/c9377426022511f9a6b8cd25090c41bd8151f184) feat(organization): export `./adapter.ts` for plugin extensibility - [`96bb4bf`](https://github.com/better-auth/better-auth/commit/96bb4bfc4afb43e15b80fdfc90ac511fc72a6f99) Merge branch 'canary' into feature/export-organization-adapter - [`af7a90c`](https://github.com/better-auth/better-auth/commit/af7a90cc97e0df6d5eb1a5c69f815ac6524a464a) lint fix - [`1d7ce78`](https://github.com/better-auth/better-auth/commit/1d7ce78c8f2d8189976429173bbc4ac2c68e4581) fix: update export statement for `getOrgAdapter` in organization index ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/index.ts` (+1 -0) </details> ### 📄 Description This PR exports `./adapter.ts` (specifically for `getOrgAdapter`) from the "organization" plugin to enable building extensions on top of it Right now, if you want to build a plugin that extends organization functionality, you need to either duplicate the adapter logic or access internal APIs. Exporting `getOrgAdapter` lets developers reuse the existing type-safe operations instead. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Exported the organization plugin’s adapter (./adapter.ts) to expose getOrgAdapter so external plugins can reuse the type-safe organization operations instead of duplicating logic. This improves plugin extensibility without relying on internal APIs. <sup>Written for commit 1d7ce78c8f2d8189976429173bbc4ac2c68e4581. Summary will update automatically 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:15:35 -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#32452