[PR #8598] docs: fix import statement in your-first-plugin.mdx #16333

Closed
opened 2026-04-13 10:29:46 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/8598

State: closed
Merged: Yes


Change createAuthMiddleware import from better-auth/plugins (invalid) to importing frombetter-auth/api.


Summary by cubic

Fixes the import example in the Your First Plugin guide to prevent copy-paste errors. createAuthMiddleware and APIError are now both imported from better-auth/api instead of createAuthMiddleware from better-auth/plugins.

Written for commit d09923d737. Summary will update on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/8598 **State:** closed **Merged:** Yes --- Change `createAuthMiddleware` import from `better-auth/plugins` (invalid) to importing from`better-auth/api`. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes the import example in the Your First Plugin guide to prevent copy-paste errors. `createAuthMiddleware` and `APIError` are now both imported from `better-auth/api` instead of `createAuthMiddleware` from `better-auth/plugins`. <sup>Written for commit d09923d7373267f5983ee8b28a6b560fb5d24fe6. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 10:29:46 -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#16333