Fix and Improve withPageAuthRequired Documentation #1750
Closed
alist wants to merge 4 commits into
Closed
Conversation
Author
|
Sorry wait my fix doesn't work, it's getting 404 despite now compiling. |
Author
|
Ok this is verified to work now |
5 tasks
|
This was helpful, thanks. |
tusharpandey13
approved these changes
Jun 6, 2025
tusharpandey13
enabled auto-merge (squash)
June 9, 2025 04:23
Contributor
|
This change was merged in a duplicate PR #2158 that has all the workflows enabled. Closing this. |
auto-merge was automatically disabled
June 11, 2025 03:56
Pull request was closed
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.
with-page-auth-required.ts was incompatible with next14 app router.
📋 Changes
Description:
This PR fixes a typo and updates the code examples for withPageAuthRequired in the documentation. The changes ensure compatibility with Next.js 14 and TypeScript by using the AppRouterPageRouteOpts type for parameters. Additionally, the function keyword is moved inside the withPageAuthRequired call for clarity and better readability.
Changes:
Reference:
Link to updated documentation page
📎 References
🎯 Testing