[PR #5576] [MERGED] docs: update nextjs 16 beta to next 16 stable #14341

Closed
opened 2026-04-13 09:25:39 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5576
Author: @AntonVishal
Created: 10/25/2025
Status: Merged
Merged: 10/25/2025
Merged by: @himself65

Base: canaryHead: docs/nextjs-16-proxy


📝 Commits (10+)

  • 9a23094 fix(organization): Certain parameters not showing in client types (#5214)
  • bce6aec Merge branch 'better-auth:canary' into canary
  • 214e761 Merge branch 'better-auth:canary' into canary
  • 7d57a46 docs: update nextjs 16 beta to next 16 stable
  • b6fd9a8 chore: clean up postcss.config.mjs by removing unused imports and code
  • b8ef62e docs: enhance Next.js middleware documentation for session handling in versions 15.1.7 and below, and 15.2.0 and above
  • 1d4a9aa docs: clarify session cookie handling in Next.js proxy/middleware for route protection
  • 79f94ae docs: add security warnings and clarify middleware route matching in Next.js documentation
  • 50a9d56 Merge branch 'canary' into docs/nextjs-16-proxy
  • 1f2b973 docs: update Next.js proxy and middleware examples to use request.headers for session handling

📊 Changes

1 file changed (+158 additions, -72 deletions)

View changed files

📝 docs/content/docs/integrations/next.mdx (+158 -72)

📄 Description

fixes : https://github.com/better-auth/better-auth/issues/5562

More clarification between proxy and middleware


Summary by cubic

Updates Next.js integration docs to 16 stable, replacing middleware with proxy and clarifying session handling across versions. Adds clear proxy/middleware examples, cookie vs validated session guidance, and security notes; minor PostCSS cleanup.

  • Migration
    • Rename middleware.ts → proxy.ts and middleware() → proxy().
    • Set runtime: "nodejs" when using auth.api in proxy/middleware.
    • Optional: run npx @next/codemod@canary middleware-to-proxy .
    • Prefer Next.js 16 for stable proxy; Node.js middleware in 15.2 is experimental.

🔄 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/5576 **Author:** [@AntonVishal](https://github.com/AntonVishal) **Created:** 10/25/2025 **Status:** ✅ Merged **Merged:** 10/25/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `docs/nextjs-16-proxy` --- ### 📝 Commits (10+) - [`9a23094`](https://github.com/better-auth/better-auth/commit/9a230944f1abf951b1e05c44d3ba729b9f9d2df9) fix(organization): Certain parameters not showing in client types (#5214) - [`bce6aec`](https://github.com/better-auth/better-auth/commit/bce6aec2c33dc4eb71706bf199fdde1792dc24eb) Merge branch 'better-auth:canary' into canary - [`214e761`](https://github.com/better-auth/better-auth/commit/214e76164458712ee619908b0a76b643d3724e5d) Merge branch 'better-auth:canary' into canary - [`7d57a46`](https://github.com/better-auth/better-auth/commit/7d57a467e7e99bfae740d43f8b27c8fd2a142f73) docs: update nextjs 16 beta to next 16 stable - [`b6fd9a8`](https://github.com/better-auth/better-auth/commit/b6fd9a8443a02cd7e10713f8531b77caf4efdfad) chore: clean up postcss.config.mjs by removing unused imports and code - [`b8ef62e`](https://github.com/better-auth/better-auth/commit/b8ef62ecf9b0802f6c6d2d31ad6e12f0dd9dafe0) docs: enhance Next.js middleware documentation for session handling in versions 15.1.7 and below, and 15.2.0 and above - [`1d4a9aa`](https://github.com/better-auth/better-auth/commit/1d4a9aa8c768f3fc09712f875b7a3ec97a3309bf) docs: clarify session cookie handling in Next.js proxy/middleware for route protection - [`79f94ae`](https://github.com/better-auth/better-auth/commit/79f94aeca9e47d1bf63f4baf8e4ece1d09684f26) docs: add security warnings and clarify middleware route matching in Next.js documentation - [`50a9d56`](https://github.com/better-auth/better-auth/commit/50a9d565694093e465f4aa413b4db11845c746b5) Merge branch 'canary' into docs/nextjs-16-proxy - [`1f2b973`](https://github.com/better-auth/better-auth/commit/1f2b973c4b3ebaeb6e9bf2b9d049d446e3c135f6) docs: update Next.js proxy and middleware examples to use request.headers for session handling ### 📊 Changes **1 file changed** (+158 additions, -72 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/integrations/next.mdx` (+158 -72) </details> ### 📄 Description fixes : https://github.com/better-auth/better-auth/issues/5562 More clarification between proxy and middleware <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Updates Next.js integration docs to 16 stable, replacing middleware with proxy and clarifying session handling across versions. Adds clear proxy/middleware examples, cookie vs validated session guidance, and security notes; minor PostCSS cleanup. - **Migration** - Rename middleware.ts → proxy.ts and middleware() → proxy(). - Set runtime: "nodejs" when using auth.api in proxy/middleware. - Optional: run npx @next/codemod@canary middleware-to-proxy . - Prefer Next.js 16 for stable proxy; Node.js middleware in 15.2 is experimental. <!-- 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-13 09:25:39 -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#14341