withPageAuth, user is always undefined

What am I doing wrong here? Or is it a bug? The user variable is always undefined...

// index.tsx

import { User, withPageAuth } from "@supabase/auth-helpers-nextjs";

type HomePageProps =
    {
        user: User;
    };

export default function HomePage({ user }: HomePageProps)
{
    return <div>Hello { user.email }</div>;
}

export const getServerSideProps = withPageAuth({ redirectTo: "/login" });
Was this page helpful?