diff --git a/src/helpers/with-page-auth-required.ts b/src/helpers/with-page-auth-required.ts
index e356bacf..7ef58854 100644
--- a/src/helpers/with-page-auth-required.ts
+++ b/src/helpers/with-page-auth-required.ts
@@ -136,9 +136,11 @@ export type WithPageAuthRequiredAppRouterOptions = {
  * // app/protected-page/page.js
  * import { withPageAuthRequired } from '@auth0/nextjs-auth0';
  *
- * export default function withPageAuthRequired(ProtectedPage() {
+ * const ProtectedPage = withPageAuthRequired(async function ProtectedPage() {
  *   return <div>Protected content</div>;
  * }, { returnTo: '/protected-page' });
+ *
+ * export default ProtectedPage;
  * ```
  *
  * If the user visits `/protected-page` without a valid session, it will redirect the user to the
@@ -153,15 +155,20 @@ export type WithPageAuthRequiredAppRouterOptions = {
  *
  * ```js
  * // app/protected-page/[slug]/page.js
- * import { withPageAuthRequired } from '@auth0/nextjs-auth0';
- *
- * export default function withPageAuthRequired(ProtectedPage() {
- *   return <div>Protected content</div>;
+ * import { AppRouterPageRouteOpts, withPageAuthRequired } from '@auth0/nextjs-auth0';
+ * 
+ * const ProtectedPage = withPageAuthRequired(async function ProtectedPage({
+ *   params, searchParams
+ * }: AppRouterPageRouteOpts) {
+ *   const slug = params?.slug as string;
+ *   return <div>Protected content for {slug}</div>;
  * }, {
  *   returnTo({ params }) {
- *     return `/protected-page/${params.slug}`
+ *     return `/protected-page/${params?.slug}`;
  *   }
  * });
+ * 
+ * export default ProtectedPage;
  * ```
  *
  * @category Server