ProtectPagePageReturnType<P,Q> = (context:GetServerSidePropsContext<Q>) =>Promise<GetServerSidePropsResult<P& {accessDenied?:boolean;user:MonoCloudUser; }>>
Return type produced by the protectPage() wrapper for the Pages Router.
Represents a getServerSideProps compatible function that resolves authentication before executing page logic and injects the authenticated user into the returned props.
| Type Parameter | Description |
|---|---|
P | Props returned from getServerSideProps. |
Q extends ParsedUrlQuery | Query parameters parsed from the URL. |
| Parameter | Type |
|---|---|
context | GetServerSidePropsContext<Q> |
Promise<GetServerSidePropsResult<P & { accessDenied?: boolean; user: MonoCloudUser; }>>