@auth0/nextjs-auth0 - v4.9.0
    Preparing search index...

    Type Alias GetServerSidePropsResultWithSession<P>

    GetServerSidePropsResultWithSession: GetServerSidePropsResult<
        P & { user: User },
    >

    If you wrap your getServerSideProps with WithPageAuthRequired your props object will be augmented with the user property, which will be the User object.

    // pages/profile.js
    import { auth0 } from "@/lib/auth0";

    export default function Profile({ user }) {
    return <div>Hello {user.name}</div>;
    }

    export const getServerSideProps = auth0.withPageAuthRequired();

    Type Parameters

    • P = any