• A utility function that is able to check the user's authentication state on the server side before rendering a page, and redirect them if needed.

    Parameters

    Returns {} | {
        redirect: {
            destination: string;
            permanent: false;
        };
    }

    An object that is able to extend the GetServerSidePropsResult to include a redirect if necessary