[PR #346] [MERGED] fix: remove nextjs auth middleware and provide a guide instead #11489

Closed
opened 2026-04-13 07:48:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/346
Author: @Bekacru
Created: 10/26/2024
Status: Merged
Merged: 10/26/2024
Merged by: @Bekacru

Base: mainHead: fix/next-middleware


📝 Commits (2)

  • 44df136 fix: remove next auth middelware and provide a guide instead
  • ce1cfcb chore:lint

📊 Changes

3 files changed (+40 additions, -104 deletions)

View changed files

📝 demo/nextjs/middleware.ts (+18 -13)
📝 docs/content/docs/integrations/next.mdx (+22 -32)
📝 packages/better-auth/src/integrations/next-js.ts (+0 -59)

📄 Description

closes #167 and closes #333

The auth middleware for Next.js is unnecessary. It can easily be added manually, and a guide that users can copy is a better abstraction than providing a small utility.


🔄 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/346 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 10/26/2024 **Status:** ✅ Merged **Merged:** 10/26/2024 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/next-middleware` --- ### 📝 Commits (2) - [`44df136`](https://github.com/better-auth/better-auth/commit/44df136c0f3ed50f2349032eced347e49a2d8713) fix: remove next auth middelware and provide a guide instead - [`ce1cfcb`](https://github.com/better-auth/better-auth/commit/ce1cfcba4c00d90ed9fcacd78d6f7c5c37c6b4b4) chore:lint ### 📊 Changes **3 files changed** (+40 additions, -104 deletions) <details> <summary>View changed files</summary> 📝 `demo/nextjs/middleware.ts` (+18 -13) 📝 `docs/content/docs/integrations/next.mdx` (+22 -32) 📝 `packages/better-auth/src/integrations/next-js.ts` (+0 -59) </details> ### 📄 Description closes #167 and closes #333 The auth middleware for Next.js is unnecessary. It can easily be added manually, and a guide that users can copy is a better abstraction than providing a small utility. --- <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-13 07:48:49 -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#11489