Deprecate middleware-based auth gating: shared notice + multi-SDK protect-pages#3404
Open
jacekradko wants to merge 1 commit into
Open
Deprecate middleware-based auth gating: shared notice + multi-SDK protect-pages#3404jacekradko wants to merge 1 commit into
jacekradko wants to merge 1 commit into
Conversation
… 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).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First in a stacked series moving Clerk away from middleware-based auth gating (
createRouteMatcherand auth checks insideclerkMiddleware) toward protecting close to the resource. Background: Deprecate middleware-based auth checks.Foundation only: a shared
_partials/middleware-auth-deprecation.mdxthat holds the deprecation wording in one editable place (it's included everywhere downstream), andprotect-pagesreworked 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 toprotect-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
@deprecatedyet. It's isolated to that one file so softening it later is a one-line change.