Sign in

Handler Type: ProtectPagePageOnGroupAccessDeniedType

ProtectPagePageOnGroupAccessDeniedType<P, Q> = (context: ProtectPageGetServerSidePropsContext<Q>) => Promise<GetServerSidePropsResult<P>> | GetServerSidePropsResult<P>

Handler invoked when an authenticated user does not satisfy the required group restrictions while running a Pages Router getServerSideProps protected by protectPage().

Type Parameters

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

Parameters

ParameterTypeDescription
contextProtectPageGetServerSidePropsContext<Q>The Next.js getServerSideProps context.

Returns

Promise<GetServerSidePropsResult<P>> | GetServerSidePropsResult<P>

A getServerSideProps result.

© 2024 MonoCloud. All rights reserved.