Sign in

Handler Type: ProtectPagePageReturnType

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 Parameters

Type ParameterDescription
PProps returned from getServerSideProps.
Q extends ParsedUrlQueryQuery parameters parsed from the URL.

Parameters

ParameterType
contextGetServerSidePropsContext<Q>

Returns

Promise<GetServerSidePropsResult<P & { accessDenied?: boolean; user: MonoCloudUser; }>>

© 2024 MonoCloud. All rights reserved.