diff --git a/EXAMPLES.md b/EXAMPLES.md index f211b8236..dace3fd3a 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -176,9 +176,10 @@ Requests to `/pages/profile` without a valid session cookie will be redirected t ```jsx // app/profile/page.js -import { withPageAuthRequired } from '@auth0/nextjs-auth0'; +import { withPageAuthRequired, getSession } from '@auth0/nextjs-auth0'; -export default withPageAuthRequired(function Profile({ user }) { +export default withPageAuthRequired(async function Profile() { + const { user } = await getSession(); return