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.
The initial authentication state of the page
An object that is able to extend the GetServerSidePropsResult to include a redirect if necessary
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.