@auth0/nextjs-auth0 - v4.17.0
    Preparing search index...

    Type Alias WithPageAuthRequiredAppRouterOptions<P>

    Specify the URL to returnTo - this is important in app router pages because the server component won't know the URL of the page. *

    type WithPageAuthRequiredAppRouterOptions<
        P extends AppRouterPageRouteOpts = AppRouterPageRouteOpts,
    > = {
        returnTo?: string | ((obj: P) => Promise<string> | string);
    }

    Type Parameters

    Index

    Properties

    Properties

    returnTo?: string | ((obj: P) => Promise<string> | string)

    The URL to redirect the user to after a successful login.

    • Can be a static string or a function that receives the page props. When used as a function, the generic P ensures that params and searchParams match the specific types of your route (e.g., from Next.js PageProps).