Skip to content

Deprecate middleware-based auth gating: shared notice + multi-SDK protect-pages#3404

Open
jacekradko wants to merge 1 commit into
mainfrom
jacek/deprecate-createroutematcher-foundation
Open

Deprecate middleware-based auth gating: shared notice + multi-SDK protect-pages#3404
jacekradko wants to merge 1 commit into
mainfrom
jacek/deprecate-createroutematcher-foundation

Conversation

@jacekradko
Copy link
Copy Markdown
Member

First in a stacked series moving Clerk away from middleware-based auth gating (createRouteMatcher and auth checks inside clerkMiddleware) toward protecting close to the resource. Background: Deprecate middleware-based auth checks.

Foundation only: a shared _partials/middleware-auth-deprecation.mdx that holds the deprecation wording in one editable place (it's included everywhere downstream), and protect-pages reworked into a multi-SDK guide. The new Next.js base covers page, route handler, Server Action, and layout protection, and flags that a layout check isn't a security boundary because layouts don't re-render on soft navigation. The existing Nuxt content moved verbatim to protect-pages.nuxt.mdx; it gets rewritten in the Nuxt PR.

One thing worth a look: the partial uses full-strength "deprecated" wording even though the SDK hasn't shipped @deprecated yet. It's isolated to that one file so softening it later is a one-line change.

… make protect-pages multi-SDK

Adds docs/_partials/middleware-auth-deprecation.mdx as the single source of truth for the deprecation notice, and reworks protect-pages into a multi-SDK guide (Next.js base covering page/route handler/Server Action/layout protection with the layout re-render caveat; existing Nuxt content moved to protect-pages.nuxt.mdx).
@jacekradko jacekradko requested a review from a team as a code owner May 29, 2026 21:26
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

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

Project Deployment Actions Updated (UTC)
clerk-docs Ready Ready Preview May 29, 2026 9:27pm

Request Review

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.

1 participant