Skip to content

docs: add callout for access control bundle size#7688

Merged
Bekacru merged 2 commits intobetter-auth:canaryfrom
jslno:01-29-2026/ac-bundle-size-callout
Jan 29, 2026
Merged

docs: add callout for access control bundle size#7688
Bekacru merged 2 commits intobetter-auth:canaryfrom
jslno:01-29-2026/ac-bundle-size-callout

Conversation

@jslno
Copy link
Copy Markdown
Contributor

@jslno jslno commented Jan 29, 2026

closes #7637


Summary by cubic

Added a warning callout in the admin and organization plugin docs to import access control from better-auth/plugins/access instead of better-auth/plugins to keep bundle sizes small. Connects to Linear #7637 by clarifying the correct import path to avoid bundle bloat.

Written for commit 8a2b1dc. Summary will update on new commits.

Copilot AI review requested due to automatic review settings January 29, 2026 16:13
@vercel
Copy link
Copy Markdown

vercel bot commented Jan 29, 2026

@jslno is attempting to deploy a commit to the better-auth Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the organization and admin plugin documentation to address bundle size issues when using access control on the client. It adds explicit warnings to use the tree-shakeable better-auth/plugins/access entrypoint instead of the broader better-auth/plugins import.

Changes:

  • Add a warning callout in the organization plugin docs around createAccessControl explaining the correct better-auth/plugins/access import to keep bundle size small.
  • Add the same warning callout to the admin plugin access control docs to reinforce the recommended import path for client-safe access control definitions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/content/docs/plugins/organization.mdx Adds a warning callout after the access control setup snippet, instructing users to import from better-auth/plugins/access to avoid pulling unnecessary server dependencies into the client bundle.
docs/content/docs/plugins/admin.mdx Adds an equivalent warning callout in the admin plugin access control section, aligning the docs with the recommended import path for better bundle sizes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Jan 29, 2026

Open in StackBlitz

better-auth

npm i https://pkg.pr.new/better-auth/better-auth@7688

@better-auth/cli

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/cli@7688

@better-auth/core

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/core@7688

@better-auth/drizzle-adapter

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/drizzle-adapter@7688

@better-auth/expo

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/expo@7688

@better-auth/i18n

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/i18n@7688

@better-auth/kysely-adapter

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/kysely-adapter@7688

@better-auth/memory-adapter

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/memory-adapter@7688

@better-auth/mongo-adapter

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/mongo-adapter@7688

@better-auth/oauth-provider

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/oauth-provider@7688

@better-auth/passkey

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/passkey@7688

@better-auth/prisma-adapter

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/prisma-adapter@7688

@better-auth/redis-storage

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/redis-storage@7688

@better-auth/scim

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/scim@7688

@better-auth/sso

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/sso@7688

@better-auth/stripe

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/stripe@7688

@better-auth/telemetry

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/telemetry@7688

@better-auth/test-utils

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/test-utils@7688

commit: 8a2b1dc

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@Bekacru Bekacru merged commit 7167362 into better-auth:canary Jan 29, 2026
20 of 23 checks passed
@better-auth better-auth locked as resolved and limited conversation to collaborators Apr 1, 2026
@bytaesu bytaesu added the locked Locked conversations after being closed for 7 days label Apr 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked Locked conversations after being closed for 7 days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using access control with the organisation client causes a huge bundle size.

4 participants