WithPageAuthRequiredAppRouterOptions: {
    returnTo?: string | ((obj) => Promise<string> | string);
}

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 declaration

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