Skip to content

Fix and Improve withPageAuthRequired Documentation (signed)#2158

Merged
tusharpandey13 merged 24 commits into
v3from
pr-1750
Jun 10, 2025
Merged

Fix and Improve withPageAuthRequired Documentation (signed)#2158
tusharpandey13 merged 24 commits into
v3from
pr-1750

Conversation

@tusharpandey13

@tusharpandey13 tusharpandey13 commented Jun 10, 2025

Copy link
Copy Markdown
Contributor

This is a copy of #1750
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:

  1. Fixed a typo in the withPageAuthRequired code example. By moving the function keyword inside the withPageAuthRequired call.
  2. Updated code example to use AppRouterPageRouteOpts for better TypeScript support.
  3. Added type assertions for params to prevent type errors.
  4. Have to do separate function declaration and export

Reference:
Link to updated documentation page

📎 References

🎯 Testing

alist and others added 23 commits June 10, 2025 17:44
Co-authored-by: Frederik Prijck <frederik.prijck@okta.com>
Co-authored-by: Filip Skokan <filip.skokan@okta.com>
Co-authored-by: Tushar Pandey <tusharpandey13@gmail.com>
Co-authored-by: Tushar Pandey <tushar.pandey@okta.com>
Co-authored-by: simon-debruijn <simon.debruijn@hotmail.com>
@tusharpandey13
tusharpandey13 requested a review from a team as a code owner June 10, 2025 12:17
@tusharpandey13
tusharpandey13 changed the base branch from main to v3 June 10, 2025 12:18
@tusharpandey13
tusharpandey13 merged commit ca2f398 into v3 Jun 10, 2025
7 of 8 checks passed
@tusharpandey13
tusharpandey13 deleted the pr-1750 branch June 10, 2025 12:38
@tusharpandey13 tusharpandey13 changed the title pr 1750 Fix and Improve withPageAuthRequired Documentation (signed) Jun 10, 2025
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.

9 participants