If you wrap your getServerSideProps with WithPageAuthRequired your props object will be augmented with the user property, which will be the User object.
getServerSideProps
// pages/profile.jsimport { auth0 } from "@/lib/auth0";export default function Profile({ user }) { return <div>Hello {user.name}</div>;}export const getServerSideProps = auth0.withPageAuthRequired(); Copy
// pages/profile.jsimport { auth0 } from "@/lib/auth0";export default function Profile({ user }) { return <div>Hello {user.name}</div>;}export const getServerSideProps = auth0.withPageAuthRequired();
If you wrap your
getServerSideProps
with WithPageAuthRequired your props object will be augmented with the user property, which will be the User object.