MonoCloud Authentication SDK
    Preparing search index...

    Type Alias ProtectPagePageOptions<P, Q>

    ProtectPagePageOptions: {
        authParams?: ExtraAuthParams;
        getServerSideProps?: GetServerSideProps<P, Q>;
        onAccessDenied?: ProtectPagePageOnAccessDeniedType<P, Q>;
        returnUrl?: string;
    } & GroupOptions

    Options for configuring protectPage() in the Pages Router.

    Type Parameters

    • P extends Record<string, any> = Record<string, any>

      The type of the props returned by getServerSideProps.

    • Q extends ParsedUrlQuery = ParsedUrlQuery

      The type of the parsed query object.

    Type Declaration

    • OptionalauthParams?: ExtraAuthParams

      Authorization parameters to be used during authentication.

    • OptionalgetServerSideProps?: GetServerSideProps<P, Q>

      Function to fetch server-side props for the protected page handler. If provided, this function will be called before rendering the protected page.

      The Next.js context object, including the request and response objects.

      Server-side props for the protected page.

    • OptionalonAccessDenied?: ProtectPagePageOnAccessDeniedType<P, Q>

      Alternate getServerSideProps function called when the user is not authenticated or is not a member of the specified groups.

    • OptionalreturnUrl?: string

      Specifies the URL to redirect to after authentication.