Skip to content

docs: update middleware.ts references to proxy.ts for Next.js 16#13373

Open
F-47 wants to merge 1 commit intonextauthjs:mainfrom
F-47:docs/update-middleware-to-proxy
Open

docs: update middleware.ts references to proxy.ts for Next.js 16#13373
F-47 wants to merge 1 commit intonextauthjs:mainfrom
F-47:docs/update-middleware-to-proxy

Conversation

@F-47
Copy link

@F-47 F-47 commented Feb 3, 2026

Summary

Next.js 16 renamed middleware.ts to proxy.ts and the exported function from middleware to proxy. The proxy.ts file also now runs on the Node.js runtime instead of the edge runtime.

This PR updates all documentation references across 9 files to reflect the new convention:

  • installation.mdx - Updated setup step to use proxy.ts with export { auth as proxy }
  • index.mdx - Updated homepage code example
  • protecting.mdx - Renamed "Next.js Middleware" section to "Next.js Proxy", updated all code examples
  • edge-compatibility.mdx - Updated split config examples, added callout noting proxy.ts runs on Node.js (edge workarounds may no longer be needed)
  • migrating-to-v5.mdx - Updated migration examples and edge compatibility section
  • role-based-access-control.mdx - Updated callout and resource links
  • passkey.mdx - Updated edge compatibility note
  • prisma.mdx - Updated middleware references in compatibility warnings
  • concepts/index.mdx - Updated FAQ about middleware/proxy compatibility

All pages include backward-compatibility notes for users on older Next.js versions who still use middleware.ts.

References

Test plan

  • Verify all internal doc links (e.g. #nextjs-proxy) resolve correctly
  • Verify code examples are syntactically correct
  • Verify callouts render properly in the docs site
  • Check that backward-compatibility notes are clear for users on older Next.js versions

Next.js 16 renamed middleware.ts to proxy.ts and the exported function
from middleware to proxy. This updates all documentation references
across installation, session protection, edge compatibility, migration,
RBAC, passkey, and Prisma adapter pages to reflect the new convention.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@vercel
Copy link

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
auth-docs Ready Ready Preview, Comment Feb 3, 2026 9:13am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
next-auth-docs Ignored Ignored Preview Feb 3, 2026 9:13am

Request Review

@vercel
Copy link

vercel bot commented Feb 3, 2026

@FGameIn is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants