From 440a62480b2b3a46bbf8fce9486c87da1a004ebc Mon Sep 17 00:00:00 2001 From: Sean Parmelee Date: Fri, 26 Jan 2024 16:34:07 -0600 Subject: [PATCH] docs: fix withPageAuthRequired example for app router --- src/helpers/with-page-auth-required.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/with-page-auth-required.ts b/src/helpers/with-page-auth-required.ts index e356bacf..1057f50f 100644 --- a/src/helpers/with-page-auth-required.ts +++ b/src/helpers/with-page-auth-required.ts @@ -136,7 +136,7 @@ export type WithPageAuthRequiredAppRouterOptions = { * // app/protected-page/page.js * import { withPageAuthRequired } from '@auth0/nextjs-auth0'; * - * export default function withPageAuthRequired(ProtectedPage() { + * export default withPageAuthRequired(async function ProtectedPage() { * return
Protected content
; * }, { returnTo: '/protected-page' }); * ``` @@ -155,7 +155,7 @@ export type WithPageAuthRequiredAppRouterOptions = { * // app/protected-page/[slug]/page.js * import { withPageAuthRequired } from '@auth0/nextjs-auth0'; * - * export default function withPageAuthRequired(ProtectedPage() { + * export default withPageAuthRequired(async function ProtectedPage() { * return
Protected content
; * }, { * returnTo({ params }) {